llvm-6502/include/llvm/CodeGen
Evan Cheng bfcb305189 Change how dbg_value sdnodes are converted into machine instructions. Their placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers.
Here is a theoretical example that illustrates why the placement is important.

tmp1 = 
store tmp1 -> x
...
tmp2 = add ...
...
call
...
store tmp2 -> x

Now mem2reg comes along:

tmp1 = 
dbg_value (tmp1 -> x)
...
tmp2 = add ...
...
call
...
dbg_value (tmp2 -> x)

When the debugger examine the value of x after the add instruction but before the call, it should have the value of tmp1.

Furthermore, for dbg_value's that reference constants, they should not be emitted at the beginning of the block (since they do not have "producers").

This patch also cleans up how SDISel manages DbgValue nodes. It allow a SDNode to be referenced by multiple SDDbgValue nodes. When a SDNode is deleted, it uses the information to find the SDDbgValues and invalidate them. They are not deleted until the corresponding SelectionDAG is destroyed.


git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99469 91177308-0d34-0410-b5e6-96231b3b80d8
2010-03-25 01:38:16 +00:00
..
AsmPrinter.h remove dead method. 2010-03-15 00:00:42 +00:00
BinaryObject.h Make a few more LLVM headers parsable as standalone headers. 2009-11-05 23:01:30 +00:00
CalcSpillWeights.h Moved spill weight calculation out of SimpleRegisterCoalescing and into its own pass: CalculateSpillWeights. 2009-12-14 06:49:42 +00:00
CallingConvLower.h Add code to check at SelectionDAGISel::LowerArguments time to see if return values can be lowered to registers. Coming soon, code to perform sret-demotion if return values cannot be lowered to registers 2009-11-07 02:11:54 +00:00
DwarfWriter.h reapply r98035: 2010-03-09 04:54:43 +00:00
ELFRelocation.h Move DataTypes.h to include/llvm/System, update all users. This breaks the last 2009-10-26 01:35:46 +00:00
FastISel.h Don't use the ISD::NodeType enum for SDNode opcodes, as CodeGen 2010-01-05 22:26:32 +00:00
GCMetadata.h switch GC_LABEL to use an MCSymbol operand instead of a label ID operand. 2010-03-14 07:27:07 +00:00
GCMetadataPrinter.h switch GC_LABEL to use an MCSymbol operand instead of a label ID operand. 2010-03-14 07:27:07 +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 Tidy up #includes, deleting a bunch of unnecessary #includes. 2009-01-05 17:59:02 +00:00
IntrinsicLowering.h Get rid of these cache variables, which are a holdover from the days when 2009-06-26 20:33:47 +00:00
JITCodeEmitter.h change EH related stuff (other than EH_LABEL) to use MCSymbol 2010-03-14 01:41:15 +00:00
LatencyPriorityQueue.h Remove some old experimental code that is no longer needed. Remove additional, speculative scheduling pass as its cost did not translate into significant performance improvement. Minor tweaks. 2009-11-20 19:32:48 +00:00
LinkAllAsmWriterComponents.h Make a few more LLVM headers parsable as standalone headers. 2009-11-05 23:01:30 +00:00
LinkAllCodegenComponents.h Remove the '-disable-scheduling' flag and replace it with the 'source' option of 2010-01-23 10:26:57 +00:00
LiveInterval.h Use methods to determine if a LiveInterval is spillable. 2010-03-01 20:59:38 +00:00
LiveIntervalAnalysis.h The check for coalescing a virtual register to a physical register, e.g. 2010-03-11 08:20:21 +00:00
LiveStackAnalysis.h The Indexes Patch. 2009-11-03 23:52:08 +00:00
LiveVariables.h Keep track of phi join registers explicitly in LiveVariables. 2010-02-23 22:43:58 +00:00
MachineBasicBlock.h eliminate the now-unneeded context argument of MBB::getSymbol() 2010-03-13 21:04:28 +00:00
MachineCodeEmitter.h change EH related stuff (other than EH_LABEL) to use MCSymbol 2010-03-14 01:41:15 +00:00
MachineCodeInfo.h Make a few more LLVM headers parsable as standalone headers. 2009-11-05 23:01:30 +00:00
MachineConstantPool.h Fix "the the" and similar typos. 2010-02-10 16:03:48 +00:00
MachineDominators.h Add a WriteAsOperand for MachineBasicBlock so MachineLoopInfo dump looks sane. 2009-11-17 19:19:59 +00:00
MachineFrameInfo.h Teach MachineFrameInfo to track maximum alignment while stack objects are being 2010-02-13 01:56:41 +00:00
MachineFunction.h eliminate the now-unneeded context argument of MBB::getSymbol() 2010-03-13 21:04:28 +00:00
MachineFunctionAnalysis.h make MachineFunction keep track of its ID and make 2010-01-26 04:35:26 +00:00
MachineFunctionPass.h Remove an unnecessary include. Now we won't have circular include 2009-08-19 23:00:07 +00:00
MachineInstr.h Move MachineInstrExpressionTrait::getHashValue() out of line so it can skip over only virtual register defs. This matches what isEqual() is doing. 2010-03-03 23:37:30 +00:00
MachineInstrBuilder.h add builder support for mcsymbol operands. 2010-03-13 08:16:25 +00:00
MachineJumpTableInfo.h Stop trying to merge identical jump tables. This had been inadvertently 2010-03-19 19:05:41 +00:00
MachineLocation.h MachineMove ctor doesn't need to to mutate input, add 'const' 2010-03-15 05:55:35 +00:00
MachineLoopInfo.h Restore dump() methods to Loop and MachineLoop. 2010-01-05 21:08:02 +00:00
MachineMemOperand.h Add non-temporal flags to MachineMemOperand. 2010-02-15 16:48:31 +00:00
MachineModuleInfo.h Fix the third (and last known) case of code update problems due 2010-03-16 00:29:39 +00:00
MachineModuleInfoImpls.h Add a bit along with the MCSymbols stored in the MachineModuleInfo maps that 2010-03-10 22:34:10 +00:00
MachineOperand.h Change how dbg_value sdnodes are converted into machine instructions. Their placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers. 2010-03-25 01:38:16 +00:00
MachinePassRegistry.h Sundry dependent-name fixes flagged by clang++. 2009-12-17 23:49:16 +00:00
MachineRegisterInfo.h Add MachineRegisterInfo::hasOneUse and hasOneNonDBGUse. 2010-03-03 21:18:38 +00:00
MachineRelocation.h Disable external stubs for X86-32 and X86-64 2010-02-04 19:56:59 +00:00
MachineSSAUpdater.h Pre-regalloc tale duplication. Work in progress. 2009-12-07 10:15:19 +00:00
MachORelocation.h Make a few more LLVM headers parsable as standalone headers. 2009-11-05 23:01:30 +00:00
ObjectCodeEmitter.h change EH related stuff (other than EH_LABEL) to use MCSymbol 2010-03-14 01:41:15 +00:00
Passes.h Add skeleton of a machine level cse pass. 2010-03-02 02:38:24 +00:00
ProcessImplicitDefs.h The Indexes Patch. 2009-11-03 23:52:08 +00:00
PseudoSourceValue.h Make PseudoSourceValue's classof recognize 2009-11-16 20:40:06 +00:00
RegAllocRegistry.h Reformat. 2009-07-08 21:57:46 +00:00
RegisterCoalescer.h Delete spurious semicolons. 2009-07-31 18:59:29 +00:00
RegisterScavenging.h Add register-reuse to frame-index register scavenging. When a target uses 2009-10-07 17:12:56 +00:00
RuntimeLibcalls.h Turn calls to copysignl into an FCOPYSIGN node. Handle FCOPYSIGN nodes 2010-03-14 21:08:40 +00:00
ScheduleDAG.h Progress towards shepherding debug info through SelectionDAG. 2010-03-10 22:13:47 +00:00
ScheduleHazardRecognizer.h Post RA scheduler changes. Introduce a hazard recognizer that uses the target schedule information to accurately model the pipeline. Update the scheduler to correctly handle multi-issue targets. 2009-08-10 15:55:25 +00:00
SchedulerRegistry.h Remove the '-disable-scheduling' flag and replace it with the 'source' option of 2010-01-23 10:26:57 +00:00
SelectionDAG.h Change how dbg_value sdnodes are converted into machine instructions. Their placement should be determined by the relative order of incoming llvm instructions. The scheduler will now use the SDNode ordering information to determine where to insert them. A dbg_value instruction is inserted after the instruction with the last highest source order and before the instruction with the next highest source order. It will optimize the placement by inserting right after the instruction that produces the value if they have consecutive order numbers. 2010-03-25 01:38:16 +00:00
SelectionDAGISel.h change the LabelSDNode to be EHLabelSDNode and make it hold 2010-03-14 02:33:54 +00:00
SelectionDAGNodes.h Speculatively revert this to see if it fixes buildbot failures. 2010-03-24 23:26:29 +00:00
SlotIndexes.h Changed the definition of an "invalid" slot to include the empty & tombstone values, but not zero. 2010-02-09 00:41:23 +00:00
TargetLoweringObjectFileImpl.h rename getSymbolForDwarf* to getExprForDwarf* since it returns 2010-03-11 19:41:58 +00:00
ValueTypes.h Do an early exit when the result is known cheaply. 2010-02-01 20:57:35 +00:00
ValueTypes.td Move Flag and isVoid after the vector types, since bit arithmetic with 2009-12-14 23:36:03 +00:00