llvm-6502/lib/VMCore
Kostya Serebryany 164b86b439 Extend Attributes to 64 bits
Problem: LLVM needs more function attributes than currently available (32 bits).
One such proposed attribute is "address_safety", which shows that a function is being checked for address safety (by AddressSanitizer, SAFECode, etc).

Solution:
- extend the Attributes from 32 bits to 64-bits
- wrap the object into a class so that unsigned is never erroneously used instead
- change "unsigned" to "Attributes" throughout the code, including one place in clang.
- the class has no "operator uint64 ()", but it has "uint64_t Raw() " to support packing/unpacking.
- the class has "safe operator bool()" to support the common idiom:  if (Attributes attr = getAttrs()) useAttrs(attr);
- The CTOR from uint64_t is marked explicit, so I had to add a few explicit CTOR calls
- Add the new attribute "address_safety". Doing it in the same commit to check that attributes beyond first 32 bits actually work.
- Some of the functions from the Attribute namespace are worth moving inside the class, but I'd prefer to have it as a separate commit.

Tested:
"make check" on Linux (32-bit and 64-bit) and Mac (10.6)
built/run spec CPU 2006 on Linux with clang -O2.


This change will break clang build in lib/CodeGen/CGCall.cpp.
The following patch will fix it.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@148553 91177308-0d34-0410-b5e6-96231b3b80d8
2012-01-20 17:56:17 +00:00
..
AsmWriter.cpp Remove unnecessary default cases in switches that cover all enum values. 2012-01-10 16:47:17 +00:00
Attributes.cpp Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00
AutoUpgrade.cpp Fix unused value warning for value used only in assert. 2011-12-12 22:59:34 +00:00
BasicBlock.cpp
CMakeLists.txt build/CMake: Finish removal of add_llvm_library_dependencies. 2011-11-29 19:25:30 +00:00
ConstantFold.cpp Don't try to create a GEP when the pointee type is unsized (such GEPs 2012-01-11 12:20:08 +00:00
ConstantFold.h
Constants.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
ConstantsContext.h Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary) 2012-01-17 04:43:56 +00:00
Core.cpp Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00
DebugInfoProbe.cpp
DebugLoc.cpp
Dominators.cpp
Function.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
GCOV.cpp
Globals.cpp
GVMaterializer.cpp
InlineAsm.cpp
Instruction.cpp Remove unreachable code. (replace with llvm_unreachable to help GCC where necessary) 2012-01-17 04:43:56 +00:00
Instructions.cpp Add support for vectors of pointers. 2011-12-05 06:29:09 +00:00
IntrinsicInst.cpp
IRBuilder.cpp Give string constants generated by IRBuilder private linkage. 2011-12-22 14:22:14 +00:00
LeakDetector.cpp
LeaksContext.h
LLVMBuild.txt LLVMBuild: Remove trailing newline, which irked me. 2011-12-12 19:48:00 +00:00
LLVMContext.cpp generalize LLVMContext::emitError to take a twine instead of a StringRef. 2012-01-03 23:47:05 +00:00
LLVMContextImpl.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
LLVMContextImpl.h The powers that be have decided that LLVM IR should now support 16-bit 2011-12-17 00:04:22 +00:00
Makefile
Metadata.cpp Using Inst->setMetadata(..., NULL) should be safe to remove metadata even when 2011-12-27 01:17:40 +00:00
Module.cpp
Pass.cpp Devirtualize Pass::getPassID, overriding it isn't useful and it gets called a lot. 2011-11-24 21:14:11 +00:00
PassManager.cpp Unweaken vtables as per http://llvm.org/docs/CodingStandards.html#ll_virtual_anch 2011-12-20 02:50:00 +00:00
PassRegistry.cpp
PrintModulePass.cpp
SymbolTableListTraitsImpl.h
Type.cpp Type: replaced usage of ID with getTypeID(). 2012-01-03 14:05:04 +00:00
Use.cpp
User.cpp Add some missing anchors. 2011-12-01 08:00:17 +00:00
Value.cpp Add a little heuristic to Value::isUsedInBasicBlock to speed it up for small basic blocks. 2011-12-05 17:23:27 +00:00
ValueSymbolTable.cpp
ValueTypes.cpp Added MVT::v2f16 2012-01-12 23:14:13 +00:00
Verifier.cpp Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00