llvm-6502/include/llvm
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
..
ADT Protect SmallVectorImpl's constructor and a few other methods that aren't meant to be public. 2012-01-20 16:39:46 +00:00
Analysis SCEVExpander fixes. Affects LSR and indvars. 2012-01-20 07:41:13 +00:00
Assembly
Bitcode Add 'llvm_unreachable' to passify GCC's understanding of the constraints 2012-01-10 18:08:01 +00:00
CodeGen More bundle related API additions. 2012-01-19 07:47:03 +00:00
Config revert r147542 after comments from Joerg Sonnenberger 2012-01-05 18:28:46 +00:00
DebugInfo
ExecutionEngine ExecutionEngine interface to re-map addresses for engines that support it. 2012-01-16 23:50:55 +00:00
MC Add a new form of MCOperand, for representing sub-instructions. This is intended for supporting bundles through the MC layer, rather than lowering them pre-MC as we currently do for Thumb2 IT blocks. Since these sub-instruction operands hold pointers to the sub-instructions, it is the responsibility of the target's AsmPrinter to provide storage for them for the duration of the EmitInstruction() call. 2012-01-19 19:24:37 +00:00
Object
Support Removes template magic to build up containers. 2012-01-17 09:34:07 +00:00
TableGen Delete CodeInit and CodeRecTy from TableGen. 2012-01-13 03:38:34 +00:00
Target Add a TargetOption for disabling tail calls. 2012-01-19 00:34:10 +00:00
Transforms Add a new ObjC ARC optimization pass to eliminate unneeded 2012-01-17 20:52:24 +00:00
Argument.h
Attributes.h Extend Attributes to 64 bits 2012-01-20 17:56:17 +00:00
AutoUpgrade.h
BasicBlock.h
CallGraphSCCPass.h
CallingConv.h
CMakeLists.txt
Constant.h
Constants.h
DebugInfoProbe.h
DefaultPasses.h
DerivedTypes.h
Function.h
GlobalAlias.h
GlobalValue.h Re-fix the issue Bill fixed in r147899 in a slightly different way, which doesn't abuse the semantics of linker_private. We don't really want to merge any string constant with a weak_odr global. 2012-01-11 22:06:46 +00:00
GlobalVariable.h
GVMaterializer.h
InitializePasses.h More bundle related API additions. 2012-01-19 07:47:03 +00:00
InlineAsm.h
InstrTypes.h
Instruction.def
Instruction.h
Instructions.h
IntrinsicInst.h
Intrinsics.h
Intrinsics.td
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsHexagon.td
IntrinsicsPowerPC.td
IntrinsicsPTX.td
IntrinsicsX86.td Add XOP Intrinsics and tests 2012-01-11 15:20:20 +00:00
IntrinsicsXCore.td
LinkAllPasses.h Add a new ObjC ARC optimization pass to eliminate unneeded 2012-01-17 20:52:24 +00:00
LinkAllVMCore.h
Linker.h
LLVMContext.h
Metadata.h
Module.h
OperandTraits.h
Operator.h
Pass.h
PassAnalysisSupport.h
PassManager.h
PassManagers.h
PassRegistry.h
PassSupport.h
SymbolTableListTraits.h
Type.h
Use.h
User.h Add some missing anchors. 2011-12-01 08:00:17 +00:00
Value.h Remove unneeded include. 2012-01-17 23:53:08 +00:00
ValueSymbolTable.h