aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineFunction.cpp
diff options
context:
space:
mode:
authorJeremy Morse <jeremy.morse@sony.com>2020-10-14 10:47:44 +0100
committerJeremy Morse <jeremy.morse@sony.com>2020-10-14 10:57:09 +0100
commit2c5f3d54c5ee4efdf63736c23a3a7b448a308996 (patch)
treeb50120adcfc91ab60863a78109537837e91eb8f8 /llvm/lib/CodeGen/MachineFunction.cpp
parentd0c95808e50c9f77484dacb8db0dc95b23f9f877 (diff)
downloadllvm-2c5f3d54c5ee4efdf63736c23a3a7b448a308996.zip
llvm-2c5f3d54c5ee4efdf63736c23a3a7b448a308996.tar.gz
llvm-2c5f3d54c5ee4efdf63736c23a3a7b448a308996.tar.bz2
[DebugInstrRef] Parse debug instruction-references from/to MIR
This patch defines the MIR format for debug instruction references: it's an integer trailing an instruction, marked out by "debug-instr-number", much like how "debug-location" identifies the DebugLoc metadata of an instruction. The instruction number is stored directly in a MachineInstr. Actually referring to an instruction comes in a later patch, but is done using one of these instruction numbers. I've added a round-trip test and two verifier checks: that we don't label meta-instructions as generating values, and that there are no duplicates. Differential Revision: https://reviews.llvm.org/D85746
Diffstat (limited to 'llvm/lib/CodeGen/MachineFunction.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineFunction.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/MachineFunction.cpp b/llvm/lib/CodeGen/MachineFunction.cpp
index 56c13096..f9fc775 100644
--- a/llvm/lib/CodeGen/MachineFunction.cpp
+++ b/llvm/lib/CodeGen/MachineFunction.cpp
@@ -943,6 +943,10 @@ void MachineFunction::moveCallSiteInfo(const MachineInstr *Old,
CallSitesInfo[New] = CSInfo;
}
+void MachineFunction::setDebugInstrNumberingCount(unsigned Num) {
+ DebugInstrNumberingCount = Num;
+}
+
/// \}
//===----------------------------------------------------------------------===//