llvm-project/llvm/include/llvm/CodeGen
Jeremy Morse 2b2ffb7bdc [DebugInfo][InstrRef][3/4] Produce DBG_INSTR_REFs for all variable locations
This patch emits DBG_INSTR_REFs for two remaining flavours of variable
locations that weren't supported: copies, and inter-block VRegs. There are
still some locations that must be represented by DBG_VALUE such as
constants, but they're mostly independent of optimisations.

For variable locations that refer to values defined in different blocks,
vregs are allocated before isel begins, but the defining instruction
might not exist until late in isel. To get around this, emit
DBG_INSTR_REFs in a "half done" state, where the first operand refers to a
VReg. Then at the end of isel, patch these back up to refer to
instructions, using the finalizeDebugInstrRefs method.

Copies are something that I complained about the original RFC, and I
really don't want to have to put instruction numbers on copies. They don't
define a value: they move them. To address this isel, salvageCopySSA
interprets:
 * COPYs,
 * SUBREG_TO_REG,
 * Anything that isCopyInstr thinks is a copy.
And follows chains of copies back to the defining instruction that they
read from. This relies on any physical registers that COPYs read being
defined in the same block, or being entry-block arguments. For the former
we can put an instruction number on the defining instruction; for the
latter we can drop a DBG_PHI that reads the incoming value.

Differential Revision: https://reviews.llvm.org/D88896
2021-07-06 18:31:38 +01:00
..
GlobalISel [GlobalISel] Clean up CombinerHelper::apply* functions to return void. 2021-07-02 13:17:06 -07:00
MIRParser [MIRParser] Add machine metadata. 2021-06-28 22:29:36 -04:00
PBQP [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
AccelTable.h [docs] Fix doxygen comments wrongly attached to the llvm namespace 2021-04-07 01:20:18 +02:00
Analysis.h [CodeGen] Remove unused function hasInlineAsmMemConstraint (NFC) 2020-12-24 09:17:58 -08:00
AntiDepBreaker.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
AsmPrinter.h Support GCC's -fstack-usage flag 2021-05-15 10:22:49 -07:00
AsmPrinterHandler.h make the AsmPrinterHandler array public 2020-11-03 10:02:09 -05:00
AtomicExpandUtils.h Copy syncscope when expanding atomicrmw into cmpxchg loop 2021-04-05 17:29:38 -07:00
BasicBlockSectionUtils.h [llvm] Add -bbsections-cold-text-prefix to emit cold clusters to a different section. 2020-09-24 15:26:15 -07:00
BasicTTIImpl.h [AArch64][CostModel] Add cost model for experimental.vector.splice 2021-07-05 14:30:24 +01:00
CSEConfigBase.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
CalcSpillWeights.h [RegAlloc] Fix "ran out of regs" with uses in statepoint 2021-03-24 10:25:34 +07:00
CallingConvLower.h [llvm][NFC] Remove CallingConvLower deprecated alignment functions 2021-05-06 07:46:19 +00:00
CodeGenPassBuilder.h Fix build after 34a8a437b 2021-05-07 23:18:44 -07:00
CommandFlags.h [IR] make stack-protector-guard-* flags into module attrs 2021-05-21 15:53:30 -07:00
CostTable.h
DAGCombine.h
DFAPacketizer.h
DIE.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
DIEValue.def DebugInfo: Add a DWARF FORM extension for addrx+offset references to reduce relocations 2021-01-28 10:20:02 -08:00
DbgEntityHistoryCalculator.h Reland [DWARF] Location-less inlined variables should not have DW_TAG_variable 2021-02-10 15:40:47 +00:00
DebugHandlerBase.h make the AsmPrinterHandler array public 2020-11-03 10:02:09 -05:00
DwarfStringPoolEntry.h [DebugInfo] Make the offset of string pool entries 64-bit (18/19). 2020-09-15 12:23:32 +07:00
EdgeBundles.h [NFC] Fix comment describing what EdgeBundles is 2021-03-24 11:04:05 +07:00
ExecutionDomainFix.h
ExpandReductions.h
ExpandVectorPredication.h Recommit "[VP,Integer,#2] ExpandVectorPredication pass" 2021-05-04 11:47:52 +02:00
FastISel.h [FastISel] Remove kill tracking 2021-04-03 15:50:13 +02:00
FaultMaps.h [FaultsMaps][llvm-objdump] Move FaultMapParser to Object/. Remove CodeGen dependency from llvm-objdump 2021-01-27 10:39:59 -08:00
FunctionLoweringInfo.h [Statepoint] Consolidate relocation type tracking [NFC] 2020-07-29 11:45:31 -07:00
GCMetadata.h [GC][NFC] Move GCStrategy from CodeGen to IR 2021-05-13 12:31:59 +07:00
GCMetadataPrinter.h
ISDOpcodes.h [llvm][clang][fpenv] Create new intrinsic llvm.arith.fence to control FP optimization at expression level 2021-06-28 12:26:52 -04:00
IndirectThunks.h [ARM][AArch64] SLSHardening: make non-comdat thunks possible 2021-05-20 17:07:05 +02:00
IntrinsicLowering.h
LatencyPriorityQueue.h
LazyMachineBlockFrequencyInfo.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
LexicalScopes.h [CodeGen] Delete 15 unused declarations 2020-12-06 14:55:04 -08:00
LinkAllAsmWriterComponents.h [GC][NFC] Move GCStrategy from CodeGen to IR 2021-05-13 12:31:59 +07:00
LinkAllCodegenComponents.h [GC][NFC] Move GCStrategy from CodeGen to IR 2021-05-13 12:31:59 +07:00
LiveInterval.h [llvm] Use llvm::any_of (NFC) 2021-01-04 11:42:47 -08:00
LiveIntervalCalc.h [NFC] Fix typo 2021-06-21 14:59:30 +02:00
LiveIntervalUnion.h [regalloc] Ensure Query::collectInterferringVregs is called before interval iteration 2021-04-01 08:33:28 -07:00
LiveIntervals.h Revert "[X86][AMX] Fix tile config register spill issue." 2021-01-21 18:11:43 +08:00
LivePhysRegs.h
LiveRangeCalc.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
LiveRangeEdit.h [NFC][Regalloc] Share the VirtRegAuxInfo object with LiveRangeEdit 2021-02-19 07:44:28 -08:00
LiveRegMatrix.h [X86] AMX programming model. 2020-12-10 17:01:54 +08:00
LiveRegUnits.h [llvm] Remove redundant return and continue statements (NFC) 2021-01-14 20:30:34 -08:00
LiveStacks.h
LiveVariables.h [NFC] Use [MC]Register in Live-ness tracking 2020-11-02 15:46:13 -08:00
LoopTraversal.h
LowLevelType.h [docs] Fix doxygen comments wrongly attached to the llvm namespace 2021-04-07 01:20:18 +02:00
MBFIWrapper.h [NFC] Add missing includes for LLVM_ENABLE_MODULES builds 2021-06-03 23:29:03 +02:00
MIRFSDiscriminator.h [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part) 2021-06-02 10:32:52 -07:00
MIRFormatter.h MIRFormatter.h - remove MachineInstr.h include. NFC. 2020-09-04 11:17:24 +01:00
MIRPrinter.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MIRYamlMapping.h [DebugInfo][InstrRef][1/4] Support transformations that widen values 2021-07-01 11:19:27 +01:00
MachORelocation.h
MachineBasicBlock.h [CSSPGO] Undoing the concept of dangling pseudo probe 2021-06-18 15:14:11 -07:00
MachineBlockFrequencyInfo.h [llvm][NFC] refactor setBlockFrequency for clarity. 2020-07-28 13:04:11 -07:00
MachineBranchProbabilityInfo.h
MachineCombinerPattern.h Revert "[AArch64] Add Machine InstCombiner patterns for FMUL indexed variant" 2021-04-12 16:28:49 +03:00
MachineConstantPool.h [NFC] Add the getSizeInBytes() interface for MachineConstantPoolValue 2021-01-05 03:22:45 +00:00
MachineDominanceFrontier.h DominanceFrontier - remove unused <vector> includes 2020-11-21 17:11:26 +00:00
MachineDominators.h MachineDominators.h - remove unused <vector> include 2020-11-21 17:11:26 +00:00
MachineFrameInfo.h [llvm] fix typo in comment 2021-06-17 14:30:52 +00:00
MachineFunction.h [DebugInfo][InstrRef][3/4] Produce DBG_INSTR_REFs for all variable locations 2021-07-06 18:31:38 +01:00
MachineFunctionPass.h
MachineInstr.h [NFC] Fix a few whitespace issues and typos. 2021-07-04 11:49:58 +01:00
MachineInstrBuilder.h [llvm, clang] Remove stdlib includes from .h files without `std::` 2021-04-27 12:41:39 -04:00
MachineInstrBundle.h
MachineInstrBundleIterator.h
MachineJumpTableInfo.h Fix the compilation assertion due to unreachable BB pruning not deleting the associated BB from the jump tables 2020-11-16 10:35:31 -06:00
MachineLoopInfo.h [ARM] Allow findLoopPreheader to return headers with multiple loop successors 2021-05-24 12:22:15 +01:00
MachineLoopUtils.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MachineMemOperand.h CodeGen: Store LLT instead of uint64_t in MachineMemOperand 2021-06-29 17:38:51 -04:00
MachineModuleInfo.h Revert "[AsmPrinter] Delete dead takeDeletedSymbsForFunction()" 2021-04-07 11:40:44 -07:00
MachineModuleInfoImpls.h
MachineModuleSlotTracker.h [MIRPrinter] Add machine metadata support. 2021-06-19 12:48:08 -04:00
MachineOperand.h [MachineFunction] Make comment for TracksLiveness more clearer 2021-04-30 12:10:36 -07:00
MachineOptimizationRemarkEmitter.h
MachineOutliner.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MachinePassManager.h [NewPM] Hide pass manager debug logging behind -debug-pass-manager-verbose 2021-05-07 21:51:47 -07:00
MachinePassRegistry.def Recommit "[VP,Integer,#2] ExpandVectorPredication pass" 2021-05-04 11:47:52 +02:00
MachinePassRegistry.h
MachinePipeliner.h [Pipeliner] Fixed optimization remarks and debug dumps Initiation 2021-02-17 12:28:37 -05:00
MachinePostDominators.h DomTree: Remove getRoots() accessor 2020-07-06 21:58:11 +02:00
MachineRegionInfo.h
MachineRegisterInfo.h [AIX][XCOFF] emit vector info of traceback table. 2021-06-14 11:15:22 -04:00
MachineSSAUpdater.h MachineSSAUpdater: Allow initialization with just a register class 2020-08-21 23:04:35 +02:00
MachineScheduler.h [NFC][Scheduler] Refactor tryCandidate to return boolean 2021-07-01 14:31:47 +08:00
MachineSizeOpts.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MachineStableHash.h [NFC] Fixing comment heading for MachineStableHash.h. 2020-10-26 18:07:26 -04:00
MachineTraceMetrics.h [NFC][MC] Type [MC]Register uses in MachineTraceMetrics 2020-10-19 09:49:52 -07:00
MacroFusion.h
ModuloSchedule.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
MultiHazardRecognizer.h HazardRecognizer - Fix definition/declaration argument name mismatches. NFCI. 2020-11-18 16:50:52 +00:00
NonRelocatableStringpool.h [DebugInfo] Make the offset of string pool entries 64-bit (18/19). 2020-09-15 12:23:32 +07:00
PBQPRAConstraint.h
ParallelCG.h [LTO] Update splitCodeGen to take a reference to the module. (NFC) 2021-01-29 11:53:11 +00:00
Passes.h [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part) 2021-06-02 10:32:52 -07:00
PreISelIntrinsicLowering.h
PseudoSourceValue.h
RDFGraph.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
RDFLiveness.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
RDFRegisters.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
ReachingDefAnalysis.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
RegAllocPBQP.h [NFC] Use [MC]Register in RegAllocPBQP & RegisterCoalescer 2020-10-26 17:13:32 -07:00
RegAllocRegistry.h
Register.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
RegisterClassInfo.h [NFC] MCRegister fixes in RegisterClassInfo, and const-ed APIs 2021-02-26 08:53:57 -08:00
RegisterPressure.h [NFC] Use Register in RegisterPressure APIs 2020-10-28 12:14:08 -07:00
RegisterScavenging.h [NFC][regalloc] Use MCRegister appropriately 2020-11-02 11:48:49 -08:00
RegisterUsageInfo.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
ReplaceWithVeclib.h [llvm] Fix header guards (NFC) 2021-02-14 08:36:18 -08:00
ResourcePriorityQueue.h [CodeGen] Delete 15 unused declarations 2020-12-06 14:55:04 -08:00
RuntimeLibcalls.h [CodeGen] Refactor libcall lookups for RTLIB::POWI_* 2021-06-02 11:40:34 +02:00
SDNodeProperties.td
ScheduleDAG.h Replace uses of std::iterator with explicit using 2021-04-12 10:47:14 -07:00
ScheduleDAGInstrs.h [CodeGen, Transforms] Use *Map::lookup (NFC) 2020-12-27 09:57:27 -08:00
ScheduleDAGMutation.h
ScheduleDFS.h
ScheduleHazardRecognizer.h HazardRecognizer - Fix definition/declaration argument name mismatches. NFCI. 2020-11-18 16:50:52 +00:00
SchedulerRegistry.h
ScoreboardHazardRecognizer.h
SelectionDAG.h [SelectionDAG] Rename memory VT argument for getMaskedGather/getMaskedScatter from VT to MemVT. 2021-07-02 17:37:40 -07:00
SelectionDAGAddressAnalysis.h
SelectionDAGISel.h [llvm][clang][fpenv] Create new intrinsic llvm.arith.fence to control FP optimization at expression level 2021-06-28 12:26:52 -04:00
SelectionDAGNodes.h [VP] Implementation of intrinsic and SDNode definitions for VP load, store, gather, scatter. 2021-07-01 13:34:44 +02:00
SelectionDAGTargetInfo.h [AArch64][SVE] Add patterns to generate FMLA/FMLS/FNMLA/FNMLS/FMAD 2021-02-18 16:55:16 +00:00
SlotIndexes.h [SlotIndexes] Fix and simplify basic block splitting 2021-01-12 10:50:14 +00:00
Spiller.h [NFC][Regalloc] Share the VirtRegAuxInfo object with LiveRangeEdit 2021-02-19 07:44:28 -08:00
StableHashing.h [NFC] Fixing a gcc compiler warning. 2020-09-08 19:44:33 -04:00
StackMaps.h [Verifier] Extend statepoint verifier to cover more constants 2021-01-13 11:51:48 +07:00
StackProtector.h
SwiftErrorValueTracking.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
SwitchLoweringUtils.h SwitchLoweringUtils.h - reduce TargetLowering.h include. NFCI. 2020-09-10 17:42:18 +01:00
TailDuplicator.h TailDuplicator: Use Register 2020-06-30 12:13:08 -04:00
TargetCallingConv.h IR+AArch64: add a "swiftasync" argument attribute. 2021-05-14 11:43:58 +01:00
TargetFrameLowering.h [CodeGen][NFC] Remove unused virtual function 2021-06-02 13:11:12 -07:00
TargetInstrInfo.h Revert "[X86FixupLEAs] Transform the sequence LEA/SUB to SUB/SUB" 2021-06-12 11:41:38 +01:00
TargetLowering.h [OpaquePtr] Add type parameter to emitLoadLinked 2021-07-02 13:07:40 -05:00
TargetLoweringObjectFileImpl.h [AIX] Add traceback ssp canary bit support 2021-06-10 02:40:02 +00:00
TargetOpcodes.h [GlobalISel] Add G_ASSERT_ZEXT 2021-01-28 13:58:37 -08:00
TargetPassConfig.h [X86] Support AMX fast register allocation 2021-05-08 14:21:11 +08:00
TargetRegisterInfo.h Retire TargetRegisterInfo::getSpillAlignment 2021-05-07 15:16:22 +02:00
TargetSchedule.h
TargetSubtargetInfo.h [X86][MC][Target] Initial backend support a tune CPU to support -mtune 2020-08-14 15:31:50 -07:00
TileShapeInfo.h [llvm, clang] Remove stdlib includes from .h files without `std::` 2021-04-27 12:41:39 -04:00
UnreachableBlockElim.h [llvm] Fix header guards (NFC) 2021-02-05 21:02:06 -08:00
ValueTypes.h Revert "[WebAssembly] Implementation of global.get/set for reftypes in LLVM IR" 2021-07-02 11:49:51 +03:00
ValueTypes.td [ValueTypes] Define MVTs for v3i64/v3f64 to complement v6i32/v6f32 2021-06-24 12:41:22 +09:00
VirtRegMap.h [NFC] Const-ed 2 APIs in VirtRegMap 2021-02-26 09:32:42 -08:00
WasmEHFuncInfo.h [WebAssembly] Rename event to tag 2021-06-17 20:34:19 -07:00
WinEHFuncInfo.h