File tree Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Expand file tree Collapse file tree 2 files changed +13
-1
lines changed Original file line number Diff line number Diff line change @@ -81,7 +81,10 @@ class LiveDebugVariablesWrapperLegacy : public MachineFunctionPass {
81
81
LiveDebugVariables &getLDV () { return *Impl; }
82
82
const LiveDebugVariables &getLDV () const { return *Impl; }
83
83
84
- void releaseMemory () override { Impl->releaseMemory (); }
84
+ void releaseMemory () override {
85
+ if (Impl)
86
+ Impl->releaseMemory ();
87
+ }
85
88
void getAnalysisUsage (AnalysisUsage &) const override ;
86
89
87
90
MachineFunctionProperties getSetProperties () const override {
@@ -97,6 +100,12 @@ class LiveDebugVariablesAnalysis
97
100
98
101
public:
99
102
using Result = LiveDebugVariables;
103
+
104
+ MachineFunctionProperties getSetProperties () const {
105
+ return MachineFunctionProperties ().set (
106
+ MachineFunctionProperties::Property::TracksDebugUserValues);
107
+ }
108
+
100
109
Result run (MachineFunction &MF, MachineFunctionAnalysisManager &MFAM);
101
110
};
102
111
Original file line number Diff line number Diff line change 38
38
#include " llvm/CodeGen/MachineInstr.h"
39
39
#include " llvm/CodeGen/MachineInstrBuilder.h"
40
40
#include " llvm/CodeGen/MachineOperand.h"
41
+ #include " llvm/CodeGen/MachinePassManager.h"
41
42
#include " llvm/CodeGen/MachineRegisterInfo.h"
42
43
#include " llvm/CodeGen/SlotIndexes.h"
43
44
#include " llvm/CodeGen/TargetInstrInfo.h"
@@ -1323,6 +1324,8 @@ AnalysisKey LiveDebugVariablesAnalysis::Key;
1323
1324
LiveDebugVariables
1324
1325
LiveDebugVariablesAnalysis::run (MachineFunction &MF,
1325
1326
MachineFunctionAnalysisManager &MFAM) {
1327
+ MFPropsModifier _ (*this , MF);
1328
+
1326
1329
auto *LIS = &MFAM.getResult <LiveIntervalsAnalysis>(MF);
1327
1330
LiveDebugVariables LDV;
1328
1331
LDV.analyze (MF, LIS);
You can’t perform that action at this time.
0 commit comments