Reimplement the parameter attributes support, phase #1. hilights:
authorChris Lattner <sabre@nondot.org>
Wed, 12 Mar 2008 17:45:29 +0000 (17:45 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 12 Mar 2008 17:45:29 +0000 (17:45 +0000)
commit58d74910c6b82e622ecbb57d6644d48fec5a5c0f
treef04d1ab294b3379bf97d9f727d4ade9e7079ca48
parent37f603f5d78f735e8de92113429b67c77aa58086
Reimplement the parameter attributes support, phase #1. hilights:

1. There is now a "PAListPtr" class, which is a smart pointer around
   the underlying uniqued parameter attribute list object, and manages
   its refcount.  It is now impossible to mess up the refcount.
2. PAListPtr is now the main interface to the underlying object, and
   the underlying object is now completely opaque.
3. Implementation details like SmallVector and FoldingSet are now no
   longer part of the interface.
4. You can create a PAListPtr with an arbitrary sequence of
   ParamAttrsWithIndex's, no need to make a SmallVector of a specific
   size (you can just use an array or scalar or vector if you wish).
5. All the client code that had to check for a null pointer before
   dereferencing the pointer is simplified to just access the
   PAListPtr directly.
6. The interfaces for adding attrs to a list and removing them is a
   bit simpler.

Phase #2 will rename some stuff (e.g. PAListPtr) and do other less
invasive changes.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@48289 91177308-0d34-0410-b5e6-96231b3b80d8
34 files changed:
include/llvm/Function.h
include/llvm/Instructions.h
include/llvm/Intrinsics.h
include/llvm/ParamAttrsList.h [deleted file]
include/llvm/ParameterAttributes.h
include/llvm/Support/CallSite.h
lib/AsmParser/llvmAsmParser.cpp.cvs
lib/AsmParser/llvmAsmParser.h.cvs
lib/AsmParser/llvmAsmParser.y
lib/AsmParser/llvmAsmParser.y.cvs
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Reader/BitcodeReader.h
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/Bitcode/Writer/ValueEnumerator.cpp
lib/Bitcode/Writer/ValueEnumerator.h
lib/Target/CBackend/CBackend.cpp
lib/Target/X86/X86ISelLowering.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
lib/Transforms/IPO/DeadArgumentElimination.cpp
lib/Transforms/IPO/GlobalOpt.cpp
lib/Transforms/IPO/PruneEH.cpp
lib/Transforms/IPO/StructRetPromotion.cpp
lib/Transforms/Scalar/InstructionCombining.cpp
lib/VMCore/AsmWriter.cpp
lib/VMCore/AutoUpgrade.cpp
lib/VMCore/Function.cpp
lib/VMCore/Instructions.cpp
lib/VMCore/ParameterAttributes.cpp
lib/VMCore/Verifier.cpp
tools/llvm-upgrade/UpgradeParser.cpp.cvs
tools/llvm-upgrade/UpgradeParser.h.cvs
tools/llvm-upgrade/UpgradeParser.y
tools/llvm-upgrade/UpgradeParser.y.cvs
tools/llvm2cpp/CppWriter.cpp