[CodeGen] Use default member initialization (NFC)

Identified with modernize-use-default-member-init.
This commit is contained in:
Kazu Hirata 2022-01-30 12:32:51 -08:00
parent 156f83adc2
commit 2bea207d26
35 changed files with 77 additions and 93 deletions

View File

@ -886,8 +886,8 @@ class DIEUnit {
DIE Die;
/// The section this unit will be emitted in. This may or may not be set to
/// a valid section depending on the client that is emitting DWARF.
MCSection *Section;
uint64_t Offset; /// .debug_info or .debug_types absolute section offset.
MCSection *Section = nullptr;
uint64_t Offset = 0; /// .debug_info or .debug_types absolute section offset.
protected:
virtual ~DIEUnit() = default;

View File

@ -217,12 +217,12 @@ protected:
/// for use in the current block. It resets to EmitStartPt when it makes sense
/// (for example, it's usually profitable to avoid function calls between the
/// definition and the use)
MachineInstr *LastLocalValue;
MachineInstr *LastLocalValue = nullptr;
/// The top most instruction in the current block that is allowed for
/// emitting local variables. LastLocalValue resets to EmitStartPt when it
/// makes sense (for example, on function calls)
MachineInstr *EmitStartPt;
MachineInstr *EmitStartPt = nullptr;
public:
virtual ~FastISel();

View File

@ -465,7 +465,7 @@ private:
ScalarSizeChangeStrategies[LastOp - FirstOp + 1];
SmallVector<SizeChangeStrategy, 1>
VectorElementSizeChangeStrategies[LastOp - FirstOp + 1];
bool TablesInitialized;
bool TablesInitialized = false;
// Data structures used by getAction:
SmallVector<SizeAndActionsVec, 1> ScalarActions[LastOp - FirstOp + 1];

View File

@ -403,9 +403,9 @@ public:
class LegalizeRuleSet {
/// When non-zero, the opcode we are an alias of
unsigned AliasOf;
unsigned AliasOf = 0;
/// If true, there is another opcode that aliases this one
bool IsAliasedByAnother;
bool IsAliasedByAnother = false;
SmallVector<LegalizeRule, 2> Rules;
#ifndef NDEBUG
@ -556,7 +556,7 @@ class LegalizeRuleSet {
}
public:
LegalizeRuleSet() : AliasOf(0), IsAliasedByAnother(false) {}
LegalizeRuleSet() = default;
bool isAliasedByAnother() { return IsAliasedByAnother; }
void setIsAliasedByAnother() { IsAliasedByAnother = true; }

View File

@ -24,10 +24,10 @@ class DataLayout;
class IntrinsicLowering {
const DataLayout &DL;
bool Warned;
bool Warned = false;
public:
explicit IntrinsicLowering(const DataLayout &DL) : DL(DL), Warned(false) {}
explicit IntrinsicLowering(const DataLayout &DL) : DL(DL) {}
/// Replace a call to the specified intrinsic function.
/// If an intrinsic function must be implemented by the code generator

View File

@ -49,14 +49,13 @@ class CalleeSavedInfo {
/// The long-term solution is to model the liveness of callee-saved registers
/// by implicit uses on the return instructions, however, the required
/// changes in the ARM backend would be quite extensive.
bool Restored;
bool Restored = true;
/// Flag indicating whether the register is spilled to stack or another
/// register.
bool SpilledToReg;
bool SpilledToReg = false;
public:
explicit CalleeSavedInfo(unsigned R, int FI = 0)
: Reg(R), FrameIdx(FI), Restored(true), SpilledToReg(false) {}
explicit CalleeSavedInfo(unsigned R, int FI = 0) : Reg(R), FrameIdx(FI) {}
// Accessors.
Register getReg() const { return Reg; }
@ -180,14 +179,14 @@ private:
/// If true, the object has been sign-extended.
bool isSExt = false;
uint8_t SSPLayout;
uint8_t SSPLayout = SSPLK_None;
StackObject(uint64_t Size, Align Alignment, int64_t SPOffset,
bool IsImmutable, bool IsSpillSlot, const AllocaInst *Alloca,
bool IsAliased, uint8_t StackID = 0)
: SPOffset(SPOffset), Size(Size), Alignment(Alignment),
isImmutable(IsImmutable), isSpillSlot(IsSpillSlot), StackID(StackID),
Alloca(Alloca), isAliased(IsAliased), SSPLayout(SSPLK_None) {}
Alloca(Alloca), isAliased(IsAliased) {}
};
/// The alignment of the stack.

View File

@ -22,7 +22,7 @@ class Module;
class MachineModuleSlotTracker : public ModuleSlotTracker {
const Function &TheFunction;
const MachineModuleInfo &TheMMI;
unsigned MDNStartSlot, MDNEndSlot;
unsigned MDNStartSlot = 0, MDNEndSlot = 0;
void processMachineFunctionMetadata(AbstractSlotTrackerStorage *AST,
const MachineFunction &MF);

View File

@ -162,7 +162,7 @@ private:
/// ParentMI - This is the instruction that this operand is embedded into.
/// This is valid for all operand types, when the operand is in an instr.
MachineInstr *ParentMI;
MachineInstr *ParentMI = nullptr;
/// Contents union - This contains the payload for the various operand types.
union ContentsUnion {
@ -200,7 +200,7 @@ private:
} Contents;
explicit MachineOperand(MachineOperandType K)
: OpKind(K), SubReg_TargetFlags(0), ParentMI(nullptr) {
: OpKind(K), SubReg_TargetFlags(0) {
// Assert that the layout is what we expect. It's easy to grow this object.
static_assert(alignof(MachineOperand) <= alignof(int64_t),
"MachineOperand shouldn't be more than 8 byte aligned");

View File

@ -84,7 +84,7 @@ private:
/// The flag is true upon \p UpdatedCSRs initialization
/// and false otherwise.
bool IsUpdatedCSRsInitialized;
bool IsUpdatedCSRsInitialized = false;
/// Contains the updated callee saved register list.
/// As opposed to the static list defined in register info,

View File

@ -46,8 +46,8 @@ public:
MachineRegisterInfo *RegInfo;
SelectionDAG *CurDAG;
std::unique_ptr<SelectionDAGBuilder> SDB;
AAResults *AA;
GCFunctionInfo *GFI;
AAResults *AA = nullptr;
GCFunctionInfo *GFI = nullptr;
CodeGenOpt::Level OptLevel;
const TargetInstrInfo *TII;
const TargetLowering *TLI;
@ -199,7 +199,7 @@ public:
protected:
/// DAGSize - Size of DAG being instruction selected.
///
unsigned DAGSize;
unsigned DAGSize = 0;
/// ReplaceUses - replace all uses of the old node F with the use
/// of the new node T.

View File

@ -319,7 +319,7 @@ class raw_ostream;
using IndexList = ilist<IndexListEntry>;
IndexList indexList;
MachineFunction *mf;
MachineFunction *mf = nullptr;
using Mi2IndexMap = DenseMap<const MachineInstr *, SlotIndex>;
Mi2IndexMap mi2iMap;

View File

@ -183,12 +183,12 @@ struct JumpTableHeader {
const Value *SValue;
MachineBasicBlock *HeaderBB;
bool Emitted;
bool FallthroughUnreachable;
bool FallthroughUnreachable = false;
JumpTableHeader(APInt F, APInt L, const Value *SV, MachineBasicBlock *H,
bool E = false)
: First(std::move(F)), Last(std::move(L)), SValue(SV), HeaderBB(H),
Emitted(E), FallthroughUnreachable(false) {}
Emitted(E) {}
};
using JumpTableBlock = std::pair<JumpTableHeader, JumpTable>;
@ -218,14 +218,14 @@ struct BitTestBlock {
BitTestInfo Cases;
BranchProbability Prob;
BranchProbability DefaultProb;
bool FallthroughUnreachable;
bool FallthroughUnreachable = false;
BitTestBlock(APInt F, APInt R, const Value *SV, unsigned Rg, MVT RgVT, bool E,
bool CR, MachineBasicBlock *P, MachineBasicBlock *D,
BitTestInfo C, BranchProbability Pr)
: First(std::move(F)), Range(std::move(R)), SValue(SV), Reg(Rg),
RegVT(RgVT), Emitted(E), ContiguousRange(CR), Parent(P), Default(D),
Cases(std::move(C)), Prob(Pr), FallthroughUnreachable(false) {}
Cases(std::move(C)), Prob(Pr) {}
};
/// Return the range of values within a range.

View File

@ -53,9 +53,9 @@ namespace ISD {
unsigned IsCopyElisionCandidate : 1; ///< Argument copy elision candidate
unsigned IsPointer : 1;
unsigned ByValOrByRefSize; ///< Byval or byref struct size
unsigned ByValOrByRefSize = 0; ///< Byval or byref struct size
unsigned PointerAddrSpace; ///< Address space of pointer argument
unsigned PointerAddrSpace = 0; ///< Address space of pointer argument
public:
ArgFlagsTy()
@ -65,8 +65,7 @@ namespace ISD {
IsSwiftError(0), IsCFGuardTarget(0), IsHva(0), IsHvaStart(0),
IsSecArgPass(0), MemAlign(0), OrigAlign(0),
IsInConsecutiveRegsLast(0), IsInConsecutiveRegs(0),
IsCopyElisionCandidate(0), IsPointer(0), ByValOrByRefSize(0),
PointerAddrSpace(0) {
IsCopyElisionCandidate(0), IsPointer(0) {
static_assert(sizeof(*this) == 3 * sizeof(unsigned), "flags are too big");
}

View File

@ -39,10 +39,10 @@ class TargetInstrInfo;
};
private:
MachineRegisterInfo *MRI;
const TargetInstrInfo *TII;
const TargetRegisterInfo *TRI;
MachineFunction *MF;
MachineRegisterInfo *MRI = nullptr;
const TargetInstrInfo *TII = nullptr;
const TargetRegisterInfo *TRI = nullptr;
MachineFunction *MF = nullptr;
/// Virt2PhysMap - This is a virtual to physical register
/// mapping. Each virtual register is required to have an entry in
@ -72,8 +72,7 @@ class TargetInstrInfo;
static char ID;
VirtRegMap()
: MachineFunctionPass(ID), MRI(nullptr), TII(nullptr), TRI(nullptr),
MF(nullptr), Virt2PhysMap(NO_PHYS_REG),
: MachineFunctionPass(ID), Virt2PhysMap(NO_PHYS_REG),
Virt2StackSlotMap(NO_STACK_SLOT), Virt2SplitMap(0) {}
VirtRegMap(const VirtRegMap &) = delete;
VirtRegMap &operator=(const VirtRegMap &) = delete;

View File

@ -314,8 +314,7 @@ unsigned DIE::computeOffsetsAndAbbrevs(const dwarf::FormParams &FormParams,
//===----------------------------------------------------------------------===//
// DIEUnit Implementation
//===----------------------------------------------------------------------===//
DIEUnit::DIEUnit(dwarf::Tag UnitTag)
: Die(UnitTag), Section(nullptr), Offset(0) {
DIEUnit::DIEUnit(dwarf::Tag UnitTag) : Die(UnitTag) {
Die.Owner = this;
assert((UnitTag == dwarf::DW_TAG_compile_unit ||
UnitTag == dwarf::DW_TAG_skeleton_unit ||

View File

@ -33,8 +33,7 @@
#include "llvm/Target/TargetOptions.h"
using namespace llvm;
DwarfCFIExceptionBase::DwarfCFIExceptionBase(AsmPrinter *A)
: EHStreamer(A), shouldEmitCFI(false), hasEmittedCFISections(false) {}
DwarfCFIExceptionBase::DwarfCFIExceptionBase(AsmPrinter *A) : EHStreamer(A) {}
void DwarfCFIExceptionBase::markFunctionEnd() {
endFragment();
@ -52,8 +51,7 @@ void DwarfCFIExceptionBase::endFragment() {
}
DwarfCFIException::DwarfCFIException(AsmPrinter *A)
: DwarfCFIExceptionBase(A), shouldEmitPersonality(false),
forceEmitPersonality(false), shouldEmitLSDA(false) {}
: DwarfCFIExceptionBase(A) {}
DwarfCFIException::~DwarfCFIException() {}

View File

@ -26,9 +26,9 @@ protected:
DwarfCFIExceptionBase(AsmPrinter *A);
/// Per-function flag to indicate if frame CFI info should be emitted.
bool shouldEmitCFI;
bool shouldEmitCFI = false;
/// Per-module flag to indicate if .cfi_section has beeen emitted.
bool hasEmittedCFISections;
bool hasEmittedCFISections = false;
void markFunctionEnd() override;
void endFragment() override;
@ -36,13 +36,13 @@ protected:
class LLVM_LIBRARY_VISIBILITY DwarfCFIException : public DwarfCFIExceptionBase {
/// Per-function flag to indicate if .cfi_personality should be emitted.
bool shouldEmitPersonality;
bool shouldEmitPersonality = false;
/// Per-function flag to indicate if .cfi_personality must be emitted.
bool forceEmitPersonality;
bool forceEmitPersonality = false;
/// Per-function flag to indicate if .cfi_lsda should be emitted.
bool shouldEmitLSDA;
bool shouldEmitLSDA = false;
public:
//===--------------------------------------------------------------------===//

View File

@ -89,8 +89,7 @@ bool DIEDwarfExpression::isFrameRegister(const TargetRegisterInfo &TRI,
DwarfUnit::DwarfUnit(dwarf::Tag UnitTag, const DICompileUnit *Node,
AsmPrinter *A, DwarfDebug *DW, DwarfFile *DWU)
: DIEUnit(UnitTag), CUNode(Node), Asm(A), DD(DW), DU(DWU),
IndexTyDie(nullptr) {}
: DIEUnit(UnitTag), CUNode(Node), Asm(A), DD(DW), DU(DWU) {}
DwarfTypeUnit::DwarfTypeUnit(DwarfCompileUnit &CU, AsmPrinter *A,
DwarfDebug *DW, DwarfFile *DWU,

View File

@ -51,7 +51,7 @@ protected:
DwarfFile *DU;
/// An anonymous type for index type. Owned by DIEUnit.
DIE *IndexTyDie;
DIE *IndexTyDie = nullptr;
/// Tracks the mapping of unit level debug information variables to debug
/// information entries.

View File

@ -3446,7 +3446,7 @@ private:
bool AllAddrModesTrivial = true;
/// Common Type for all different fields in addressing modes.
Type *CommonType;
Type *CommonType = nullptr;
/// SimplifyQuery for simplifyInstruction utility.
const SimplifyQuery &SQ;
@ -3456,7 +3456,7 @@ private:
public:
AddressingModeCombiner(const SimplifyQuery &_SQ, Value *OriginalValue)
: CommonType(nullptr), SQ(_SQ), Original(OriginalValue) {}
: SQ(_SQ), Original(OriginalValue) {}
/// Get the combined AddrMode
const ExtAddrMode &getAddrMode() const {

View File

@ -111,12 +111,11 @@ public:
/// Information about each phi in the Tail block.
struct PHIInfo {
MachineInstr *PHI;
unsigned TReg, FReg;
unsigned TReg = 0, FReg = 0;
// Latencies from Cond+Branch, TReg, and FReg to DstReg.
int CondCycles, TCycles, FCycles;
int CondCycles = 0, TCycles = 0, FCycles = 0;
PHIInfo(MachineInstr *phi)
: PHI(phi), TReg(0), FReg(0), CondCycles(0), TCycles(0), FCycles(0) {}
PHIInfo(MachineInstr *phi) : PHI(phi) {}
};
SmallVector<PHIInfo, 8> PHIs;

View File

@ -70,8 +70,8 @@ class MemCmpExpansion {
CallInst *const CI;
ResultBlock ResBlock;
const uint64_t Size;
unsigned MaxLoadSize;
uint64_t NumLoadsNonOneByte;
unsigned MaxLoadSize = 0;
uint64_t NumLoadsNonOneByte = 0;
const uint64_t NumLoadsPerBlockForZeroCmp;
std::vector<BasicBlock *> LoadCmpBlocks;
BasicBlock *EndBlock;
@ -219,8 +219,7 @@ MemCmpExpansion::MemCmpExpansion(
const TargetTransformInfo::MemCmpExpansionOptions &Options,
const bool IsUsedForZeroCmp, const DataLayout &TheDataLayout,
DomTreeUpdater *DTU)
: CI(CI), Size(Size), MaxLoadSize(0), NumLoadsNonOneByte(0),
NumLoadsPerBlockForZeroCmp(Options.NumLoadsPerBlock),
: CI(CI), Size(Size), NumLoadsPerBlockForZeroCmp(Options.NumLoadsPerBlock),
IsUsedForZeroCmp(IsUsedForZeroCmp), DL(TheDataLayout), DTU(DTU),
Builder(CI) {
assert(Size > 0 && "zero blocks");

View File

@ -64,7 +64,7 @@ raw_ostream &llvm::operator<<(raw_ostream &OS, LegacyLegalizeAction Action) {
return OS;
}
LegacyLegalizerInfo::LegacyLegalizerInfo() : TablesInitialized(false) {
LegacyLegalizerInfo::LegacyLegalizerInfo() {
// Set defaults.
// FIXME: these two (G_ANYEXT and G_TRUNC?) can be legalized to the
// fundamental load/store Jakob proposed. Once loads & stores are supported.

View File

@ -1211,11 +1211,11 @@ bool IfConverter::FeasibilityAnalysis(BBInfo &BBI,
void IfConverter::AnalyzeBlock(
MachineBasicBlock &MBB, std::vector<std::unique_ptr<IfcvtToken>> &Tokens) {
struct BBState {
BBState(MachineBasicBlock &MBB) : MBB(&MBB), SuccsAnalyzed(false) {}
BBState(MachineBasicBlock &MBB) : MBB(&MBB) {}
MachineBasicBlock *MBB;
/// This flag is true if MBB's successors have been analyzed.
bool SuccsAnalyzed;
bool SuccsAnalyzed = false;
};
// Push MBB to the stack.

View File

@ -656,10 +656,10 @@ public:
};
/// Basic-block the load instructions are within
BasicBlock *BB;
BasicBlock *BB = nullptr;
/// Pointer value of all participation load instructions
Value *PV;
Value *PV = nullptr;
/// Participating load instructions
std::set<LoadInst *> LIs;
@ -668,7 +668,7 @@ public:
std::set<Instruction *> Is;
/// Final shuffle-vector instruction
ShuffleVectorInst *SVI;
ShuffleVectorInst *SVI = nullptr;
/// Information of the offset for each vector element
ElementInfo *EI;
@ -676,8 +676,7 @@ public:
/// Vector Type
FixedVectorType *const VTy;
VectorInfo(FixedVectorType *VTy)
: BB(nullptr), PV(nullptr), SVI(nullptr), VTy(VTy) {
VectorInfo(FixedVectorType *VTy) : VTy(VTy) {
EI = new ElementInfo[VTy->getNumElements()];
}

View File

@ -329,7 +329,7 @@ private:
EntryValueKind,
EntryValueBackupKind,
EntryValueCopyBackupKind
} EVKind;
} EVKind = EntryValueLocKind::NonEntryValueKind;
/// The value location. Stored separately to avoid repeatedly
/// extracting it from MI.
@ -397,8 +397,7 @@ private:
VarLoc(const MachineInstr &MI, LexicalScopes &LS)
: Var(MI.getDebugVariable(), MI.getDebugExpression(),
MI.getDebugLoc()->getInlinedAt()),
Expr(MI.getDebugExpression()), MI(MI),
EVKind(EntryValueLocKind::NonEntryValueKind) {
Expr(MI.getDebugExpression()), MI(MI) {
assert(MI.isDebugValue() && "not a DBG_VALUE");
assert((MI.isDebugValueList() || MI.getNumOperands() == 4) &&
"malformed DBG_VALUE");

View File

@ -66,8 +66,7 @@ MachineModuleSlotTracker::MachineModuleSlotTracker(
const MachineFunction *MF, bool ShouldInitializeAllMetadata)
: ModuleSlotTracker(MF->getFunction().getParent(),
ShouldInitializeAllMetadata),
TheFunction(MF->getFunction()), TheMMI(MF->getMMI()), MDNStartSlot(0),
MDNEndSlot(0) {
TheFunction(MF->getFunction()), TheMMI(MF->getMMI()) {
setProcessHook([this](AbstractSlotTrackerStorage *AST, const Module *M,
bool ShouldInitializeAllMetadata) {
this->processMachineModule(AST, M, ShouldInitializeAllMetadata);

View File

@ -43,8 +43,7 @@ void MachineRegisterInfo::Delegate::anchor() {}
MachineRegisterInfo::MachineRegisterInfo(MachineFunction *MF)
: MF(MF), TracksSubRegLiveness(MF->getSubtarget().enableSubRegLiveness() &&
EnableSubRegLiveness),
IsUpdatedCSRsInitialized(false) {
EnableSubRegLiveness) {
unsigned NumRegs = getTargetRegisterInfo()->getNumRegs();
VRegInfo.reserve(256);
RegAllocHints.reserve(256);

View File

@ -139,7 +139,7 @@ namespace {
///
/// This is the instruction number from the top of the current block, not
/// the SlotIndex. It is only used by the AntiDepBreaker.
unsigned EndIndex;
unsigned EndIndex = 0;
public:
SchedulePostRATDList(
@ -206,7 +206,7 @@ SchedulePostRATDList::SchedulePostRATDList(
const RegisterClassInfo &RCI,
TargetSubtargetInfo::AntiDepBreakMode AntiDepMode,
SmallVectorImpl<const TargetRegisterClass *> &CriticalPathRCs)
: ScheduleDAGInstrs(MF, &MLI), AA(AA), EndIndex(0) {
: ScheduleDAGInstrs(MF, &MLI), AA(AA) {
const InstrItineraryData *InstrItins =
MF.getSubtarget().getInstrItineraryData();

View File

@ -143,7 +143,7 @@ namespace {
SelectionDAG &DAG;
const TargetLowering &TLI;
const SelectionDAGTargetInfo *STI;
CombineLevel Level;
CombineLevel Level = BeforeLegalizeTypes;
CodeGenOpt::Level OptLevel;
bool LegalDAG = false;
bool LegalOperations = false;
@ -238,8 +238,7 @@ namespace {
public:
DAGCombiner(SelectionDAG &D, AliasAnalysis *AA, CodeGenOpt::Level OL)
: DAG(D), TLI(D.getTargetLoweringInfo()),
STI(D.getSubtarget().getSelectionDAGInfo()),
Level(BeforeLegalizeTypes), OptLevel(OL), AA(AA) {
STI(D.getSubtarget().getSelectionDAGInfo()), OptLevel(OL), AA(AA) {
ForCodeSize = DAG.shouldOptForSize();
DisableGenericCombines = STI && STI->disableGenericCombines(OptLevel);

View File

@ -1838,8 +1838,7 @@ FastISel::FastISel(FunctionLoweringInfo &FuncInfo,
TII(*MF->getSubtarget().getInstrInfo()),
TLI(*MF->getSubtarget().getTargetLowering()),
TRI(*MF->getSubtarget().getRegisterInfo()), LibInfo(LibInfo),
SkipTargetIndependentISel(SkipTargetIndependentISel),
LastLocalValue(nullptr), EmitStartPt(nullptr) {}
SkipTargetIndependentISel(SkipTargetIndependentISel) {}
FastISel::~FastISel() = default;

View File

@ -47,8 +47,7 @@ static cl::opt<int> HighLatencyCycles(
"instructions take for targets with no itinerary"));
ScheduleDAGSDNodes::ScheduleDAGSDNodes(MachineFunction &mf)
: ScheduleDAG(mf), BB(nullptr), DAG(nullptr),
InstrItins(mf.getSubtarget().getInstrItineraryData()) {}
: ScheduleDAG(mf), InstrItins(mf.getSubtarget().getInstrItineraryData()) {}
/// Run - perform scheduling.
///
@ -577,7 +576,7 @@ void ScheduleDAGSDNodes::RegDefIter::InitNodeNumDefs() {
// Construct a RegDefIter for this SUnit and find the first valid value.
ScheduleDAGSDNodes::RegDefIter::RegDefIter(const SUnit *SU,
const ScheduleDAGSDNodes *SD)
: SchedDAG(SD), Node(SU->getNode()), DefIdx(0), NodeNumDefs(0) {
: SchedDAG(SD), Node(SU->getNode()) {
InitNodeNumDefs();
Advance();
}

View File

@ -45,8 +45,8 @@ class InstrItineraryData;
///
class ScheduleDAGSDNodes : public ScheduleDAG {
public:
MachineBasicBlock *BB;
SelectionDAG *DAG; // DAG of the current basic block
MachineBasicBlock *BB = nullptr;
SelectionDAG *DAG = nullptr; // DAG of the current basic block
const InstrItineraryData *InstrItins;
/// The schedule. Null SUnit*'s represent noop instructions.
@ -138,8 +138,8 @@ class InstrItineraryData;
class RegDefIter {
const ScheduleDAGSDNodes *SchedDAG;
const SDNode *Node;
unsigned DefIdx;
unsigned NodeNumDefs;
unsigned DefIdx = 0;
unsigned NodeNumDefs = 0;
MVT ValueType;
public:

View File

@ -319,7 +319,7 @@ SelectionDAGISel::SelectionDAGISel(TargetMachine &tm, CodeGenOpt::Level OL)
CurDAG(new SelectionDAG(tm, OL)),
SDB(std::make_unique<SelectionDAGBuilder>(*CurDAG, *FuncInfo, *SwiftError,
OL)),
AA(), GFI(), OptLevel(OL), DAGSize(0) {
OptLevel(OL) {
initializeGCModuleInfoPass(*PassRegistry::getPassRegistry());
initializeBranchProbabilityInfoWrapperPassPass(
*PassRegistry::getPassRegistry());

View File

@ -20,7 +20,7 @@ using namespace llvm;
char SlotIndexes::ID = 0;
SlotIndexes::SlotIndexes() : MachineFunctionPass(ID), mf(nullptr) {
SlotIndexes::SlotIndexes() : MachineFunctionPass(ID) {
initializeSlotIndexesPass(*PassRegistry::getPassRegistry());
}