[PATCH] D148312: Fix uninitialized pointer members in Target/X86

LuoYuanke via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Apr 15 01:35:41 PDT 2023


This revision was automatically updated to reflect the committed changes.
Closed by commit rGcaa9d6e2f0c6: Fix uninitialized pointer members in Target/X86 (authored by akshaykhadse, committed by LuoYuanke).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D148312/new/

https://reviews.llvm.org/D148312

Files:
  llvm/lib/Target/X86/X86FixupBWInsts.cpp
  llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
  llvm/lib/Target/X86/X86PartialReduction.cpp
  llvm/lib/Target/X86/X86PreTileConfig.cpp


Index: llvm/lib/Target/X86/X86PreTileConfig.cpp
===================================================================
--- llvm/lib/Target/X86/X86PreTileConfig.cpp
+++ 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<MachineInstr *, 8> DefVisited;
   DenseMap<MachineBasicBlock *, BBInfo> BBVisitedInfo;
   DenseMap<MachineBasicBlock *, SmallVector<MIRef, 8>> ShapeBBs;
Index: llvm/lib/Target/X86/X86PartialReduction.cpp
===================================================================
--- llvm/lib/Target/X86/X86PartialReduction.cpp
+++ 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.
Index: llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
===================================================================
--- llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
+++ 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<MachineGadgetGraph>
   getGadgetGraph(MachineFunction &MF, const MachineLoopInfo &MLI,
Index: llvm/lib/Target/X86/X86FixupBWInsts.cpp
===================================================================
--- llvm/lib/Target/X86/X86FixupBWInsts.cpp
+++ 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;
 }


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D148312.513860.patch
Type: text/x-patch
Size: 2298 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230415/c4e5dd86/attachment.bin>


More information about the llvm-commits mailing list