Skip to content

Commit

Permalink
Fix uninitialized pointer members in Target/X86
Browse files Browse the repository at this point in the history
Reviewed By: LuoYuanke

Differential Revision: https://reviews.llvm.org/D148312
  • Loading branch information
akshaykhadse authored and LuoYuanke committed Apr 15, 2023
1 parent 2a7e1a1 commit caa9d6e
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions llvm/lib/Target/X86/X86FixupBWInsts.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -148,8 +148,8 @@ class FixupBWInstPass : public MachineFunctionPass {
/// Register Liveness information after the current instruction.
LivePhysRegs LiveRegs;

ProfileSummaryInfo *PSI;
MachineBlockFrequencyInfo *MBFI;
ProfileSummaryInfo *PSI = nullptr;
MachineBlockFrequencyInfo *MBFI = nullptr;
};
char FixupBWInstPass::ID = 0;
}
Expand Down
6 changes: 3 additions & 3 deletions llvm/lib/Target/X86/X86LoadValueInjectionLoadHardening.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -154,9 +154,9 @@ class X86LoadValueInjectionLoadHardeningPass : public MachineFunctionPass {
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,
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/X86/X86PartialReduction.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ using namespace llvm;
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.
Expand Down
4 changes: 2 additions & 2 deletions llvm/lib/Target/X86/X86PreTileConfig.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,8 @@ struct BBInfo {
};

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;
Expand Down

0 comments on commit caa9d6e

Please sign in to comment.