llvm-6502/include/llvm
Chandler Carruth 4d628e200f We really want to hash pairs of directly-hashable data as directly
hashable data. This matters when we have pair<T*, U*> as a key, which is
quite common in DenseMap, etc. To that end, we need to detect when this
is safe. The requirements on a generic std::pair<T, U> are:

1) Both T and U must satisfy the existing is_hashable_data trait. Note
   that this includes the requirement that T and U have no internal
   padding bits or other bits not contributing directly to equality.
2) The alignment constraints of std::pair<T, U> do not require padding
   between consecutive objects.
3) The alignment constraints of U and the size of T do not conspire to
   require padding between the first and second elements.

Grow two somewhat magical traits to detect this by forming a pod
structure and inspecting offset artifacts on it. Hopefully this won't
cause any compilers to panic.

Added and adjusted tests now that pairs, even nested pairs, are treated
as just sequences of data.

Thanks to Jeffrey Yasskin for helping me sort through this and reviewing
the somewhat subtle traits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@151883 91177308-0d34-0410-b5e6-96231b3b80d8
2012-03-02 09:26:36 +00:00
..
ADT We really want to hash pairs of directly-hashable data as directly 2012-03-02 09:26:36 +00:00
Analysis Change the implementation of dominates(inst, inst) to one based on what the 2012-02-26 02:19:19 +00:00
Assembly
Bitcode BitstreamWriter: Use SmallVector::append instead of multiple push_back calls. 2012-02-29 21:02:05 +00:00
CodeGen Make InlineSpiller bundle-aware. 2012-03-01 01:43:25 +00:00
Config add LLVM_VERSION_MAJOR and _MINOR defines 2012-02-13 18:48:10 +00:00
DebugInfo
ExecutionEngine Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
MC Grammar-o in function name. 2012-03-02 02:11:47 +00:00
Object [Object] 2012-03-01 22:19:54 +00:00
Support We really want to hash pairs of directly-hashable data as directly 2012-03-02 09:26:36 +00:00
TableGen Add Foreach Loop 2012-02-22 16:09:41 +00:00
Target Move getSubRegIndex out of generated code into MCRegisterInfo, devirtualize it. 2012-03-01 18:16:35 +00:00
Transforms Add support for disabling llvm.lifetime intrinsics in the AlwaysInliner. These 2012-02-25 02:56:01 +00:00
Argument.h
Attributes.h Don't use static CTORs for the Attributes constants, while still keeping the class type-safe 2012-02-08 01:11:21 +00:00
AutoUpgrade.h
BasicBlock.h Add a constified getLandingPad() method. 2012-01-31 00:26:24 +00:00
CallGraphSCCPass.h
CallingConv.h
CMakeLists.txt
Constant.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Constants.h Efficient Constant Uniquing. 2012-02-05 20:54:10 +00:00
DebugInfoProbe.h
DefaultPasses.h
DerivedTypes.h
Function.h
GlobalAlias.h
GlobalValue.h
GlobalVariable.h
GVMaterializer.h
InitializePasses.h ThreadSanitizer, a race detector. First LLVM commit. 2012-02-13 22:50:51 +00:00
InlineAsm.h
InstrTypes.h
Instruction.def [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
Instruction.h
Instructions.h [unwind removal] Remove all of the code for the dead 'unwind' instruction. There 2012-02-06 21:44:22 +00:00
IntrinsicInst.h Remove the eh.exception and eh.selector intrinsics. Also remove a hack to copy 2012-01-31 01:46:13 +00:00
Intrinsics.h
Intrinsics.td Remove the now-dead llvm.eh.exception and llvm.eh.selector intrinsics. 2012-01-31 01:58:48 +00:00
IntrinsicsARM.td
IntrinsicsCellSPU.td
IntrinsicsHexagon.td
IntrinsicsPowerPC.td
IntrinsicsPTX.td
IntrinsicsX86.td Remove GCC builtins for vpermilp* intrinsics as clang no longer needs them. Custom lower the intrinsics to the vpermilp target specific node and remove intrinsic patterns. 2012-02-08 06:36:57 +00:00
IntrinsicsXCore.td
LinkAllPasses.h Add a basic-block autovectorization pass. 2012-02-01 03:51:43 +00:00
LinkAllVMCore.h
Linker.h
LLVMContext.h
Metadata.h Add a way to replace a field inside a metadata node. This can be 2012-02-15 09:09:29 +00:00
Module.h s/ModAttrBehavior/ModFlagBehavior/g to be consistent with how module flags are named elsewhere. 2012-02-16 10:28:10 +00:00
OperandTraits.h
Operator.h
Pass.h Added TargetPassConfig::disablePass/substitutePass as a general mechanism to override specific passes. 2012-02-15 03:21:47 +00:00
PassAnalysisSupport.h
PassManager.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassManagers.h Add pass printer passes in the right place. 2012-02-01 07:16:20 +00:00
PassRegistry.h
PassSupport.h
SymbolTableListTraits.h
Type.h add StructType helpers too. 2012-01-26 00:06:44 +00:00
Use.h
User.h Convert assert(0) to llvm_unreachable 2012-02-05 22:14:15 +00:00
Value.h
ValueSymbolTable.h