diff --git a/llvm/lib/Target/X86/X86FixupBWInsts.cpp b/llvm/lib/Target/X86/X86FixupBWInsts.cpp --- a/llvm/lib/Target/X86/X86FixupBWInsts.cpp +++ b/llvm/lib/Target/X86/X86FixupBWInsts.cpp @@ -148,8 +148,8 @@ /// Register Liveness information after the current instruction. LivePhysRegs LiveRegs; - ProfileSummaryInfo *PSI; - MachineBlockFrequencyInfo *MBFI; + ProfileSummaryInfo *PSI = nullptr; + MachineBlockFrequencyInfo *MBFI = nullptr; }; char FixupBWInstPass::ID = 0; } diff --git a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp --- a/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp +++ b/llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp @@ -154,9 +154,9 @@ using EdgeSet = MachineGadgetGraph::EdgeSet; using NodeSet = MachineGadgetGraph::NodeSet; - const X86Subtarget *STI; - const TargetInstrInfo *TII; - const TargetRegisterInfo *TRI; + const X86Subtarget *STI = nullptr; + const TargetInstrInfo *TII = nullptr; + const TargetRegisterInfo *TRI = nullptr; std::unique_ptr getGadgetGraph(MachineFunction &MF, const MachineLoopInfo &MLI, diff --git a/llvm/lib/Target/X86/X86PartialReduction.cpp b/llvm/lib/Target/X86/X86PartialReduction.cpp --- a/llvm/lib/Target/X86/X86PartialReduction.cpp +++ b/llvm/lib/Target/X86/X86PartialReduction.cpp @@ -33,8 +33,8 @@ namespace { class X86PartialReduction : public FunctionPass { - const DataLayout *DL; - const X86Subtarget *ST; + const DataLayout *DL = nullptr; + const X86Subtarget *ST = nullptr; public: static char ID; // Pass identification, replacement for typeid. diff --git a/llvm/lib/Target/X86/X86PreTileConfig.cpp b/llvm/lib/Target/X86/X86PreTileConfig.cpp --- a/llvm/lib/Target/X86/X86PreTileConfig.cpp +++ b/llvm/lib/Target/X86/X86PreTileConfig.cpp @@ -98,8 +98,8 @@ }; class X86PreTileConfig : public MachineFunctionPass { - MachineRegisterInfo *MRI; - const MachineLoopInfo *MLI; + MachineRegisterInfo *MRI = nullptr; + const MachineLoopInfo *MLI = nullptr; SmallSet DefVisited; DenseMap BBVisitedInfo; DenseMap> ShapeBBs;