aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/MachineCombiner.cpp
diff options
context:
space:
mode:
authorAkshay Khadse <akshayskhadse@gmail.com>2023-04-17 16:16:23 +0800
committerLuo, Yuanke <yuanke.luo@intel.com>2023-04-17 16:32:46 +0800
commit8bf7f86d7966ff835967669fb6bf23897e20b71d (patch)
treeac732355d5e16c7444bcf1a20c59ed65bcdab7c2 /llvm/lib/CodeGen/MachineCombiner.cpp
parent83ab5708d1d00f4ec2541e960bff3b5c68001c9e (diff)
downloadllvm-8bf7f86d7966ff835967669fb6bf23897e20b71d.zip
llvm-8bf7f86d7966ff835967669fb6bf23897e20b71d.tar.gz
llvm-8bf7f86d7966ff835967669fb6bf23897e20b71d.tar.bz2
Fix uninitialized pointer members in CodeGen
This change initializes the members TSI, LI, DT, PSI, and ORE pointer feilds of the SelectOptimize class to nullptr. Reviewed By: LuoYuanke Differential Revision: https://reviews.llvm.org/D148303
Diffstat (limited to 'llvm/lib/CodeGen/MachineCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/MachineCombiner.cpp18
1 files changed, 9 insertions, 9 deletions
diff --git a/llvm/lib/CodeGen/MachineCombiner.cpp b/llvm/lib/CodeGen/MachineCombiner.cpp
index fd02d1b..eb98ccd 100644
--- a/llvm/lib/CodeGen/MachineCombiner.cpp
+++ b/llvm/lib/CodeGen/MachineCombiner.cpp
@@ -63,16 +63,16 @@ static cl::opt<bool> VerifyPatternOrder(
namespace {
class MachineCombiner : public MachineFunctionPass {
- const TargetSubtargetInfo *STI;
- const TargetInstrInfo *TII;
- const TargetRegisterInfo *TRI;
+ const TargetSubtargetInfo *STI = nullptr;
+ const TargetInstrInfo *TII = nullptr;
+ const TargetRegisterInfo *TRI = nullptr;
MCSchedModel SchedModel;
- MachineRegisterInfo *MRI;
- MachineLoopInfo *MLI; // Current MachineLoopInfo
- MachineTraceMetrics *Traces;
- MachineTraceMetrics::Ensemble *TraceEnsemble;
- MachineBlockFrequencyInfo *MBFI;
- ProfileSummaryInfo *PSI;
+ MachineRegisterInfo *MRI = nullptr;
+ MachineLoopInfo *MLI = nullptr; // Current MachineLoopInfo
+ MachineTraceMetrics *Traces = nullptr;
+ MachineTraceMetrics::Ensemble *TraceEnsemble = nullptr;
+ MachineBlockFrequencyInfo *MBFI = nullptr;
+ ProfileSummaryInfo *PSI = nullptr;
RegisterClassInfo RegClassInfo;
TargetSchedModel TSchedModel;