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 {
8181 LiveDebugVariables &getLDV () { return *Impl; }
8282 const LiveDebugVariables &getLDV () const { return *Impl; }
8383
84- void releaseMemory () override { Impl->releaseMemory (); }
84+ void releaseMemory () override {
85+ if (Impl)
86+ Impl->releaseMemory ();
87+ }
8588 void getAnalysisUsage (AnalysisUsage &) const override ;
8689
8790 MachineFunctionProperties getSetProperties () const override {
@@ -97,6 +100,12 @@ class LiveDebugVariablesAnalysis
97100
98101public:
99102 using Result = LiveDebugVariables;
103+
104+ MachineFunctionProperties getSetProperties () const {
105+ return MachineFunctionProperties ().set (
106+ MachineFunctionProperties::Property::TracksDebugUserValues);
107+ }
108+
100109 Result run (MachineFunction &MF, MachineFunctionAnalysisManager &MFAM);
101110};
102111
Original file line number Diff line number Diff line change 3838#include " llvm/CodeGen/MachineInstr.h"
3939#include " llvm/CodeGen/MachineInstrBuilder.h"
4040#include " llvm/CodeGen/MachineOperand.h"
41+ #include " llvm/CodeGen/MachinePassManager.h"
4142#include " llvm/CodeGen/MachineRegisterInfo.h"
4243#include " llvm/CodeGen/SlotIndexes.h"
4344#include " llvm/CodeGen/TargetInstrInfo.h"
@@ -1323,6 +1324,8 @@ AnalysisKey LiveDebugVariablesAnalysis::Key;
13231324LiveDebugVariables
13241325LiveDebugVariablesAnalysis::run (MachineFunction &MF,
13251326 MachineFunctionAnalysisManager &MFAM) {
1327+ MFPropsModifier _ (*this , MF);
1328+
13261329 auto *LIS = &MFAM.getResult <LiveIntervalsAnalysis>(MF);
13271330 LiveDebugVariables LDV;
13281331 LDV.analyze (MF, LIS);
You can’t perform that action at this time.
0 commit comments