llvm-6502/include/llvm/CodeGen
Dan Gohman 6520e20e4f Teach DAGCombine to fold constant offsets into GlobalAddress nodes,
and add a TargetLowering hook for it to use to determine when this
is legal (i.e. not in PIC mode, etc.)

This allows instruction selection to emit folded constant offsets
in more cases, such as the included testcase, eliminating the need
for explicit arithmetic instructions.

This eliminates the need for the C++ code in X86ISelDAGToDAG.cpp
that attempted to achieve the same effect, but wasn't as effective.

Also, fix handling of offsets in GlobalAddressSDNodes in several
places, including changing GlobalAddressSDNode's offset from
int to int64_t.

The Mips, Alpha, Sparc, and CellSPU targets appear to be
unaware of GlobalAddress offsets currently, so set the hook to
false on those targets.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@57748 91177308-0d34-0410-b5e6-96231b3b80d8
2008-10-18 02:06:02 +00:00
..
AsmPrinter.h Use generic section-handling stuff to emit constant pool entries 2008-09-24 22:17:59 +00:00
BreakCriticalMachineEdge.h Switch the MachineOperand accessors back to the short names like 2008-10-03 15:45:36 +00:00
CallingConvLower.h Define CallSDNode, an SDNode subclass for use with ISD::CALL. 2008-09-13 01:54:27 +00:00
DAGISelHeader.h Optimize SelectionDAG's AssignTopologicalOrder even further. 2008-09-30 18:30:35 +00:00
DwarfWriter.h If we have a function with an unreachable statement such that the ending debug 2008-09-26 00:28:12 +00:00
ELFRelocation.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
FastISel.h FastISel support for exception-handling constructs. 2008-10-14 23:54:11 +00:00
FileWriters.h Use raw_ostream throughout the AsmPrinter. 2008-08-21 00:14:44 +00:00
GCMetadata.h Rename some GC classes so that their roll will hopefully be clearer. 2008-08-17 18:44:35 +00:00
GCMetadataPrinter.h Use raw_ostream throughout the AsmPrinter. 2008-08-21 00:14:44 +00:00
GCs.h Rename some GC classes so that their roll will hopefully be clearer. 2008-08-17 18:44:35 +00:00
GCStrategy.h Rename some GC classes so that their roll will hopefully be clearer. 2008-08-17 18:44:35 +00:00
IntrinsicLowering.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
LinkAllAsmWriterComponents.h Rename some GC classes so that their roll will hopefully be clearer. 2008-08-17 18:44:35 +00:00
LinkAllCodegenComponents.h A Partitioned Boolean Quadratic Programming (PBQP) based register allocator. 2008-10-02 18:29:27 +00:00
LiveInterval.h Next round of earlyclobber handling. Approach the 2008-09-24 01:07:17 +00:00
LiveIntervalAnalysis.h Trim #includes. 2008-10-16 20:18:31 +00:00
LiveStackAnalysis.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
LiveVariables.h Switch the MachineOperand accessors back to the short names like 2008-10-03 15:45:36 +00:00
MachineBasicBlock.h Const-ify several TargetInstrInfo methods. 2008-10-16 01:49:15 +00:00
MachineCodeEmitter.h Prune and tidy #includes. 2008-05-29 19:52:31 +00:00
MachineConstantPool.h Fix these comments to reflect current reality. Surprisingly, 2008-09-16 20:45:53 +00:00
MachineDominators.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
MachineFrameInfo.h Re-apply 56683 with fixes. 2008-09-27 01:56:22 +00:00
MachineFunction.h Update VS projects. 2008-09-20 18:02:18 +00:00
MachineFunctionPass.h Tidy up several unbeseeming casts from pointer to intptr_t. 2008-09-04 17:05:41 +00:00
MachineInstr.h Add a method to MachineInstr for testing whether it makes 2008-09-24 00:06:15 +00:00
MachineInstrBuilder.h Teach DAGCombine to fold constant offsets into GlobalAddress nodes, 2008-10-18 02:06:02 +00:00
MachineJumpTableInfo.h Fix more -Wshorten-64-to-32 warnings. 2008-05-05 18:30:58 +00:00
MachineLocation.h Switch the MachineOperand accessors back to the short names like 2008-10-03 15:45:36 +00:00
MachineLoopInfo.h Use empty() instead of begin() == end(). 2008-08-14 18:13:49 +00:00
MachineMemOperand.h Change the FoldingSetNodeID usage for objects which carry 2008-08-20 15:58:01 +00:00
MachineModuleInfo.h Move the include of MachineLocation.h into MachineModuleInfo.h 2008-10-16 00:20:14 +00:00
MachineOperand.h Teach DAGCombine to fold constant offsets into GlobalAddress nodes, 2008-10-18 02:06:02 +00:00
MachinePassRegistry.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
MachineRegisterInfo.h Enable rematerialization of constants using AliasAnalysis::pointsToConstantMemory, 2008-07-25 00:02:30 +00:00
MachineRelocation.h Revert 51775. 2008-05-30 22:47:19 +00:00
MachORelocation.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
Passes.h A Partitioned Boolean Quadratic Programming (PBQP) based register allocator. 2008-10-02 18:29:27 +00:00
PseudoSourceValue.h Unbreak PseudoSourceValue::print. This fixes -print-machine-instrs 2008-08-27 15:24:43 +00:00
RegAllocRegistry.h Don't attribute in file headers anymore. See llvmdev for the 2007-12-29 19:59:42 +00:00
RegisterCoalescer.h Remove uses of "llvm/Support/Debug.h" from LLVM include files, which 2008-07-07 18:14:29 +00:00
RegisterScavenging.h Allow registers defined by implicit_def to be clobbered. 2008-04-10 23:47:53 +00:00
RuntimeLibcalls.h Add intrinsics for log, log2, log10, exp, exp2. 2008-09-04 00:47:13 +00:00
ScheduleDAG.h Next round of earlyclobber handling. Approach the 2008-09-24 01:07:17 +00:00
SchedulerRegistry.h Do not use computationally expensive scheduling heuristics with -fast. 2008-07-01 18:05:03 +00:00
SelectionDAG.h Teach DAGCombine to fold constant offsets into GlobalAddress nodes, 2008-10-18 02:06:02 +00:00
SelectionDAGISel.h FastISel support for exception-handling constructs. 2008-10-14 23:54:11 +00:00
SelectionDAGNodes.h Teach DAGCombine to fold constant offsets into GlobalAddress nodes, 2008-10-18 02:06:02 +00:00
ValueTypes.h fit in 80 cols, minor tweaks 2008-09-09 17:52:13 +00:00
ValueTypes.td Added support for overloading intrinsics (atomics) based on pointers 2008-07-30 04:36:53 +00:00