diff --git a/llvm/lib/CodeGen/SelectOptimize.cpp b/llvm/lib/CodeGen/SelectOptimize.cpp --- a/llvm/lib/CodeGen/SelectOptimize.cpp +++ b/llvm/lib/CodeGen/SelectOptimize.cpp @@ -98,15 +98,15 @@ class SelectOptimize : public FunctionPass { const TargetMachine *TM = nullptr; - const TargetSubtargetInfo *TSI; + const TargetSubtargetInfo *TSI = nullptr; const TargetLowering *TLI = nullptr; const TargetTransformInfo *TTI = nullptr; - const LoopInfo *LI; - DominatorTree *DT; + const LoopInfo *LI = nullptr; + DominatorTree *DT = nullptr; std::unique_ptr BFI; std::unique_ptr BPI; - ProfileSummaryInfo *PSI; - OptimizationRemarkEmitter *ORE; + ProfileSummaryInfo *PSI = nullptr; + OptimizationRemarkEmitter *ORE = nullptr; TargetSchedModel TSchedModel; public: