[llvm] Remove redundant member initialization (NFC)

Identified with readability-redundant-member-init.
This commit is contained in:
Kazu Hirata 2022-01-08 11:56:44 -08:00
parent 51fd157635
commit f44473ec4e
53 changed files with 70 additions and 103 deletions

View File

@ -272,9 +272,7 @@ public:
/// Default constructor is the same as an empty string and leaves all
/// triple fields unknown.
Triple()
: Data(), Arch(), SubArch(), Vendor(), OS(), Environment(),
ObjectFormat() {}
Triple() : Arch(), SubArch(), Vendor(), OS(), Environment(), ObjectFormat() {}
explicit Triple(const Twine &Str);
Triple(const Twine &ArchStr, const Twine &VendorStr, const Twine &OSStr);

View File

@ -57,7 +57,7 @@ public:
BasicAAResult(const DataLayout &DL, const Function &F,
const TargetLibraryInfo &TLI, AssumptionCache &AC,
DominatorTree *DT = nullptr, PhiValues *PV = nullptr)
: AAResultBase(), DL(DL), F(F), TLI(TLI), AC(AC), DT(DT), PV(PV) {}
: DL(DL), F(F), TLI(TLI), AC(AC), DT(DT), PV(PV) {}
BasicAAResult(const BasicAAResult &Arg)
: AAResultBase(Arg), DL(Arg.DL), F(Arg.F), TLI(Arg.TLI), AC(Arg.AC),

View File

@ -52,7 +52,7 @@ public:
};
DDGNode() = delete;
DDGNode(const NodeKind K) : DDGNodeBase(), Kind(K) {}
DDGNode(const NodeKind K) : Kind(K) {}
DDGNode(const DDGNode &N) : DDGNodeBase(N), Kind(N.Kind) {}
DDGNode(DDGNode &&N) : DDGNodeBase(std::move(N)), Kind(N.Kind) {}
virtual ~DDGNode() = 0;

View File

@ -1203,7 +1203,7 @@ private:
}
};
inline LazyCallGraph::Edge::Edge() : Value() {}
inline LazyCallGraph::Edge::Edge() {}
inline LazyCallGraph::Edge::Edge(Node &N, Kind K) : Value(&N, K) {}
inline LazyCallGraph::Edge::operator bool() const {

View File

@ -284,8 +284,7 @@ public:
return T.isScalable() ? UnknownSize : T.getFixedSize();
}
MemoryLocation()
: Ptr(nullptr), Size(LocationSize::beforeOrAfterPointer()), AATags() {}
MemoryLocation() : Ptr(nullptr), Size(LocationSize::beforeOrAfterPointer()) {}
explicit MemoryLocation(const Value *Ptr, LocationSize Size,
const AAMDNodes &AATags = AAMDNodes())

View File

@ -40,7 +40,7 @@ class ObjCARCAAResult : public AAResultBase<ObjCARCAAResult> {
const DataLayout &DL;
public:
explicit ObjCARCAAResult(const DataLayout &DL) : AAResultBase(), DL(DL) {}
explicit ObjCARCAAResult(const DataLayout &DL) : DL(DL) {}
ObjCARCAAResult(ObjCARCAAResult &&Arg)
: AAResultBase(std::move(Arg)), DL(Arg.DL) {}

View File

@ -27,7 +27,7 @@ class SCEVAAResult : public AAResultBase<SCEVAAResult> {
ScalarEvolution &SE;
public:
explicit SCEVAAResult(ScalarEvolution &SE) : AAResultBase(), SE(SE) {}
explicit SCEVAAResult(ScalarEvolution &SE) : SE(SE) {}
SCEVAAResult(SCEVAAResult &&Arg) : AAResultBase(std::move(Arg)), SE(Arg.SE) {}
AliasResult alias(const MemoryLocation &LocA, const MemoryLocation &LocB,

View File

@ -159,7 +159,7 @@ protected:
class AddIRPass {
public:
AddIRPass(ModulePassManager &MPM, bool DebugPM, bool Check = true)
: MPM(MPM), FPM() {
: MPM(MPM) {
if (Check)
AddingFunctionPasses = false;
}

View File

@ -95,7 +95,7 @@ public:
bool IsFixed = true)
: ArgInfo(Regs, OrigValue.getType(), OrigIndex, Flags, IsFixed, &OrigValue) {}
ArgInfo() : BaseArgInfo() {}
ArgInfo() {}
};
struct CallLoweringInfo {

View File

@ -556,7 +556,7 @@ class LegalizeRuleSet {
}
public:
LegalizeRuleSet() : AliasOf(0), IsAliasedByAnother(false), Rules() {}
LegalizeRuleSet() : AliasOf(0), IsAliasedByAnother(false) {}
bool isAliasedByAnother() { return IsAliasedByAnother; }
void setIsAliasedByAnother() { IsAliasedByAnother = true; }

View File

@ -253,7 +253,7 @@ public:
public:
MBBInsertPoint(MachineBasicBlock &MBB, bool Beginning = true)
: InsertPoint(), MBB(MBB), Beginning(Beginning) {
: MBB(MBB), Beginning(Beginning) {
// If we try to insert before phis, we should use the insertion
// points on the incoming edges.
assert((!Beginning || MBB.getFirstNonPHI() == MBB.begin()) &&
@ -299,7 +299,7 @@ public:
public:
EdgeInsertPoint(MachineBasicBlock &Src, MachineBasicBlock &Dst, Pass &P)
: InsertPoint(), Src(Src), DstOrSplit(&Dst), P(P) {}
: Src(Src), DstOrSplit(&Dst), P(P) {}
bool isSplit() const override {
return Src.succ_size() > 1 && DstOrSplit->pred_size() > 1;

View File

@ -40,10 +40,10 @@ class MachineFunctionAnalysisManager : public AnalysisManager<MachineFunction> {
public:
using Base = AnalysisManager<MachineFunction>;
MachineFunctionAnalysisManager() : Base(), FAM(nullptr), MAM(nullptr) {}
MachineFunctionAnalysisManager() : FAM(nullptr), MAM(nullptr) {}
MachineFunctionAnalysisManager(FunctionAnalysisManager &FAM,
ModuleAnalysisManager &MAM)
: Base(), FAM(&FAM), MAM(&MAM) {}
: FAM(&FAM), MAM(&MAM) {}
MachineFunctionAnalysisManager(MachineFunctionAnalysisManager &&) = default;
MachineFunctionAnalysisManager &
operator=(MachineFunctionAnalysisManager &&) = default;
@ -135,7 +135,7 @@ public:
MachineFunctionPassManager(bool DebugLogging = false,
bool RequireCodeGenSCCOrder = false,
bool VerifyMachineFunction = false)
: Base(), RequireCodeGenSCCOrder(RequireCodeGenSCCOrder),
: RequireCodeGenSCCOrder(RequireCodeGenSCCOrder),
VerifyMachineFunction(VerifyMachineFunction) {}
MachineFunctionPassManager(MachineFunctionPassManager &&) = default;
MachineFunctionPassManager &

View File

@ -39,7 +39,7 @@ private:
public:
BaseIndexOffset() = default;
BaseIndexOffset(SDValue Base, SDValue Index, bool IsIndexSignExt)
: Base(Base), Index(Index), Offset(), IsIndexSignExt(IsIndexSignExt) {}
: Base(Base), Index(Index), IsIndexSignExt(IsIndexSignExt) {}
BaseIndexOffset(SDValue Base, SDValue Index, int64_t Offset,
bool IsIndexSignExt)
: Base(Base), Index(Index), Offset(Offset),

View File

@ -385,8 +385,8 @@ private:
: Die(Die), Type(T), CU(CU), Flags(0), OtherInfo(OtherInfo) {}
WorklistItem(unsigned AncestorIdx, CompileUnit &CU, unsigned Flags)
: Die(), Type(WorklistItemType::LookForParentDIEsToKeep), CU(CU),
Flags(Flags), AncestorIdx(AncestorIdx) {}
: Type(WorklistItemType::LookForParentDIEsToKeep), CU(CU), Flags(Flags),
AncestorIdx(AncestorIdx) {}
};
/// returns true if we need to translate strings.

View File

@ -20,7 +20,7 @@ namespace gsym {
/// string at offset zero. Strings must be UTF8 NULL terminated strings.
struct StringTable {
StringRef Data;
StringTable() : Data() {}
StringTable() {}
StringTable(StringRef D) : Data(D) {}
StringRef operator[](size_t Offset) const { return getString(Offset); }
StringRef getString(uint32_t Offset) const {

View File

@ -87,7 +87,7 @@ private:
public:
PlainPrinterBase(raw_ostream &OS, raw_ostream &ES, PrinterConfig &Config)
: DIPrinter(), OS(OS), ES(ES), Config(Config) {}
: OS(OS), ES(ES), Config(Config) {}
void print(const Request &Request, const DILineInfo &Info) override;
void print(const Request &Request, const DIInliningInfo &Info) override;
@ -138,7 +138,7 @@ private:
public:
JSONPrinter(raw_ostream &OS, PrinterConfig &Config)
: DIPrinter(), OS(OS), Config(Config) {}
: OS(OS), Config(Config) {}
void print(const Request &Request, const DILineInfo &Info) override;
void print(const Request &Request, const DIInliningInfo &Info) override;

View File

@ -80,8 +80,7 @@ class FileCheckType {
std::bitset<FileCheckKindModifier::Size> Modifiers;
public:
FileCheckType(FileCheckKind Kind = CheckNone)
: Kind(Kind), Count(1), Modifiers() {}
FileCheckType(FileCheckKind Kind = CheckNone) : Kind(Kind), Count(1) {}
FileCheckType(const FileCheckType &) = default;
FileCheckType &operator=(const FileCheckType &) = default;

View File

@ -459,8 +459,7 @@ private:
class FPPassManager : public ModulePass, public PMDataManager {
public:
static char ID;
explicit FPPassManager()
: ModulePass(ID), PMDataManager() { }
explicit FPPassManager() : ModulePass(ID) {}
/// run - Execute all of the passes scheduled for execution. Keep track of
/// whether any of the passes modifies the module, and if so, return true.

View File

@ -55,7 +55,7 @@ public:
MemoryGroup()
: NumPredecessors(0), NumExecutingPredecessors(0),
NumExecutedPredecessors(0), NumInstructions(0), NumExecuting(0),
NumExecuted(0), CriticalPredecessor(), CriticalMemoryInstruction() {}
NumExecuted(0), CriticalPredecessor() {}
MemoryGroup(MemoryGroup &&) = default;
size_t getNumSuccessors() const {

View File

@ -118,8 +118,8 @@ class DefaultResourceStrategy final : public ResourceStrategy {
public:
DefaultResourceStrategy(uint64_t UnitMask)
: ResourceStrategy(), ResourceUnitMask(UnitMask),
NextInSequenceMask(UnitMask), RemovedFromNextInSequence(0) {}
: ResourceUnitMask(UnitMask), NextInSequenceMask(UnitMask),
RemovedFromNextInSequence(0) {}
virtual ~DefaultResourceStrategy() = default;
uint64_t select(uint64_t ReadyMask) override;

View File

@ -36,7 +36,7 @@ class EntryStage final : public Stage {
EntryStage &operator=(const EntryStage &Other) = delete;
public:
EntryStage(SourceMgr &SM) : CurrentInstruction(), SM(SM), NumRetired(0) { }
EntryStage(SourceMgr &SM) : SM(SM), NumRetired(0) {}
bool isAvailable(const InstRef &IR) const override;
bool hasWorkToComplete() const override;

View File

@ -49,7 +49,7 @@ class ExecuteStage final : public Stage {
public:
ExecuteStage(Scheduler &S) : ExecuteStage(S, false) {}
ExecuteStage(Scheduler &S, bool ShouldPerformBottleneckAnalysis)
: Stage(), HWS(S), NumDispatchedOpcodes(0), NumIssuedOpcodes(0),
: HWS(S), NumDispatchedOpcodes(0), NumIssuedOpcodes(0),
EnablePressureEvents(ShouldPerformBottleneckAnalysis) {}
// This stage works under the assumption that the Pipeline will eventually

View File

@ -38,7 +38,7 @@ struct StallInfo {
unsigned CyclesLeft;
StallKind Kind;
StallInfo() : IR(), CyclesLeft(), Kind(StallKind::DEFAULT) {}
StallInfo() : CyclesLeft(), Kind(StallKind::DEFAULT) {}
StallKind getStallKind() const { return Kind; }
unsigned getCyclesLeft() const { return CyclesLeft; }

View File

@ -32,7 +32,7 @@ class InstructionTables final : public Stage {
public:
InstructionTables(const MCSchedModel &Model)
: Stage(), SM(Model), Masks(Model.getNumProcResourceKinds()) {
: SM(Model), Masks(Model.getNumProcResourceKinds()) {
computeProcResourceMasks(Model, Masks);
}

View File

@ -36,7 +36,7 @@ class RetireStage final : public Stage {
public:
RetireStage(RetireControlUnit &R, RegisterFile &F, LSUnitBase &LS)
: Stage(), RCU(R), PRF(F), LSU(LS) {}
: RCU(R), PRF(F), LSU(LS) {}
bool hasWorkToComplete() const override { return !RCU.isEmpty(); }
Error cycleStart() override;

View File

@ -702,7 +702,7 @@ public:
LineCoverageIterator(const CoverageData &CD, unsigned Line)
: CD(CD), WrappedSegment(nullptr), Next(CD.begin()), Ended(false),
Line(Line), Segments(), Stats() {
Line(Line) {
this->operator++();
}

View File

@ -56,10 +56,10 @@ public:
using reference = value_type &;
CoverageMappingIterator()
: Reader(nullptr), Record(), ReadErr(coveragemap_error::success) {}
: Reader(nullptr), ReadErr(coveragemap_error::success) {}
CoverageMappingIterator(CoverageMappingReader *Reader)
: Reader(Reader), Record(), ReadErr(coveragemap_error::success) {
: Reader(Reader), ReadErr(coveragemap_error::success) {
increment();
}

View File

@ -48,7 +48,7 @@ struct RemarkSerializer {
RemarkSerializer(Format SerializerFormat, raw_ostream &OS,
SerializerMode Mode)
: SerializerFormat(SerializerFormat), OS(OS), Mode(Mode), StrTab() {}
: SerializerFormat(SerializerFormat), OS(OS), Mode(Mode) {}
/// This is just an interface.
virtual ~RemarkSerializer() = default;

View File

@ -799,7 +799,7 @@ struct DelimitedScope {
};
struct DictScope : DelimitedScope {
explicit DictScope() : DelimitedScope() {}
explicit DictScope() {}
explicit DictScope(ScopedPrinter &W) : DelimitedScope(W) { W.objectBegin(); }
DictScope(ScopedPrinter &W, StringRef N) : DelimitedScope(W) {
@ -818,7 +818,7 @@ struct DictScope : DelimitedScope {
};
struct ListScope : DelimitedScope {
explicit ListScope() : DelimitedScope() {}
explicit ListScope() {}
explicit ListScope(ScopedPrinter &W) : DelimitedScope(W) { W.arrayBegin(); }
ListScope(ScopedPrinter &W, StringRef N) : DelimitedScope(W) {

View File

@ -2365,7 +2365,7 @@ struct BooleanState : public IntegerStateBase<bool, true, false> {
using super = IntegerStateBase<bool, true, false>;
using base_t = IntegerStateBase::base_t;
BooleanState() : super() {}
BooleanState() {}
BooleanState(base_t Assumed) : super(Assumed) {}
/// Set the assumed value to \p Value but never below the known one.

View File

@ -435,8 +435,7 @@ public:
bool UseBlockFrequencyInfo = false,
bool UseBranchProbabilityInfo = false,
bool LoopNestMode = false)
: Pass(std::move(Pass)), LoopCanonicalizationFPM(),
UseMemorySSA(UseMemorySSA),
: Pass(std::move(Pass)), UseMemorySSA(UseMemorySSA),
UseBlockFrequencyInfo(UseBlockFrequencyInfo),
UseBranchProbabilityInfo(UseBranchProbabilityInfo),
LoopNestMode(LoopNestMode) {

View File

@ -41,7 +41,7 @@ private:
Block CurrentBlock{0, 0, nullptr, {}};
public:
explicit BlockIndexer(Index &I) : RecordVisitor(), Indices(I) {}
explicit BlockIndexer(Index &I) : Indices(I) {}
Error visit(BufferExtents &) override;
Error visit(WallclockRecord &) override;

View File

@ -36,8 +36,7 @@ class BlockPrinter : public RecordVisitor {
State CurrentState = State::Start;
public:
explicit BlockPrinter(raw_ostream &O, RecordPrinter &P)
: RecordVisitor(), OS(O), RP(P) {}
explicit BlockPrinter(raw_ostream &O, RecordPrinter &P) : OS(O), RP(P) {}
Error visit(BufferExtents &) override;
Error visit(WallclockRecord &) override;

View File

@ -30,7 +30,7 @@ class LogBuilderConsumer : public RecordConsumer {
public:
explicit LogBuilderConsumer(std::vector<std::unique_ptr<Record>> &R)
: RecordConsumer(), Records(R) {}
: Records(R) {}
Error consume(std::unique_ptr<Record> R) override;
};
@ -42,8 +42,7 @@ class PipelineConsumer : public RecordConsumer {
std::vector<RecordVisitor *> Visitors;
public:
PipelineConsumer(std::initializer_list<RecordVisitor *> V)
: RecordConsumer(), Visitors(V) {}
PipelineConsumer(std::initializer_list<RecordVisitor *> V) : Visitors(V) {}
Error consume(std::unique_ptr<Record> R) override;
};

View File

@ -424,7 +424,7 @@ public:
static constexpr uint16_t DefaultVersion = 5u;
explicit RecordInitializer(DataExtractor &DE, uint64_t &OP, uint16_t V)
: RecordVisitor(), E(DE), OffsetPtr(OP), Version(V) {}
: E(DE), OffsetPtr(OP), Version(V) {}
explicit RecordInitializer(DataExtractor &DE, uint64_t &OP)
: RecordInitializer(DE, OP, DefaultVersion) {}

View File

@ -36,7 +36,7 @@ class TraceExpander : public RecordVisitor {
public:
explicit TraceExpander(function_ref<void(const XRayRecord &)> F, uint16_t L)
: RecordVisitor(), C(std::move(F)), LogVersion(L) {}
: C(std::move(F)), LogVersion(L) {}
Error visit(BufferExtents &) override;
Error visit(WallclockRecord &) override;

View File

@ -25,7 +25,7 @@ class RecordPrinter : public RecordVisitor {
public:
explicit RecordPrinter(raw_ostream &O, std::string D)
: RecordVisitor(), OS(O), Delim(std::move(D)) {}
: OS(O), Delim(std::move(D)) {}
explicit RecordPrinter(raw_ostream &O) : RecordPrinter(O, ""){};

View File

@ -167,8 +167,8 @@ static bool checkHVXPipes(const HVXInstsT &hvxInsts, unsigned startIdx,
HexagonShuffler::HexagonShuffler(MCContext &Context, bool ReportErrors,
MCInstrInfo const &MCII,
MCSubtargetInfo const &STI)
: Context(Context), BundleFlags(), MCII(MCII), STI(STI), Loc(),
ReportErrors(ReportErrors), CheckFailure(), AppliedRestrictions() {
: Context(Context), BundleFlags(), MCII(MCII), STI(STI),
ReportErrors(ReportErrors), CheckFailure() {
reset();
}

View File

@ -103,7 +103,7 @@ public:
std::string Filename;
TimestampTy Timestamp;
KeyTy() : Filename(), Timestamp() {}
KeyTy() {}
KeyTy(StringRef Filename, TimestampTy Timestamp)
: Filename(Filename.str()), Timestamp(Timestamp) {}
};

View File

@ -27,7 +27,7 @@ Reproducer::Reproducer() : VFS(vfs::getRealFileSystem()) {}
Reproducer::~Reproducer() = default;
ReproducerGenerate::ReproducerGenerate(std::error_code &EC)
: Root(createReproducerDir(EC)), FC() {
: Root(createReproducerDir(EC)) {
if (!Root.empty())
FC = std::make_shared<FileCollector>(Root, Root);
VFS = FileCollector::createCollectorVFS(vfs::getRealFileSystem(), FC);

View File

@ -191,8 +191,7 @@ struct FunctionCoverageSummary {
BranchCoverageInfo BranchCoverage;
FunctionCoverageSummary(const std::string &Name)
: Name(Name), ExecutionCount(0), RegionCoverage(), LineCoverage(),
BranchCoverage() {}
: Name(Name), ExecutionCount(0) {}
FunctionCoverageSummary(const std::string &Name, uint64_t ExecutionCount,
const RegionCoverageInfo &RegionCoverage,
@ -223,9 +222,7 @@ struct FileCoverageSummary {
FunctionCoverageInfo FunctionCoverage;
FunctionCoverageInfo InstantiationCoverage;
FileCoverageSummary(StringRef Name)
: Name(Name), RegionCoverage(), LineCoverage(), FunctionCoverage(),
InstantiationCoverage() {}
FileCoverageSummary(StringRef Name) : Name(Name) {}
FileCoverageSummary &operator+=(const FileCoverageSummary &RHS) {
RegionCoverage += RHS.RegionCoverage;

View File

@ -63,7 +63,7 @@ class CodeRegion {
public:
CodeRegion(llvm::StringRef Desc, llvm::SMLoc Start)
: Description(Desc), RangeStart(Start), RangeEnd() {}
: Description(Desc), RangeStart(Start) {}
void addInstruction(const llvm::MCInst &Instruction) {
Instructions.emplace_back(Instruction);

View File

@ -53,7 +53,7 @@ class PipelinePrinter {
public:
PipelinePrinter(Pipeline &Pipe, const CodeRegion &R, unsigned Idx,
const MCSubtargetInfo &STI, const PipelineOptions &PO)
: P(Pipe), Region(R), RegionIdx(Idx), STI(STI), PO(PO), Views() {}
: P(Pipe), Region(R), RegionIdx(Idx), STI(STI), PO(PO) {}
void addView(std::unique_ptr<View> V) {
P.addEventListener(V.get());

View File

@ -934,8 +934,7 @@ class BinaryELFBuilder : public BasicELFBuilder {
public:
BinaryELFBuilder(MemoryBuffer *MB, uint8_t NewSymbolVisibility)
: BasicELFBuilder(), MemBuf(MB),
NewSymbolVisibility(NewSymbolVisibility) {}
: MemBuf(MB), NewSymbolVisibility(NewSymbolVisibility) {}
Expected<std::unique_ptr<Object>> build();
};
@ -946,8 +945,7 @@ class IHexELFBuilder : public BasicELFBuilder {
void addDataSections();
public:
IHexELFBuilder(const std::vector<IHexRecord> &Records)
: BasicELFBuilder(), Records(Records) {}
IHexELFBuilder(const std::vector<IHexRecord> &Records) : Records(Records) {}
Expected<std::unique_ptr<Object>> build();
};

View File

@ -80,7 +80,7 @@ class LiveVariablePrinter {
public:
LiveVariablePrinter(const MCRegisterInfo &MRI, const MCSubtargetInfo &STI)
: LiveVariables(), ActiveCols(Column()), MRI(MRI), STI(STI) {}
: ActiveCols(Column()), MRI(MRI), STI(STI) {}
void dump() const;

View File

@ -204,8 +204,8 @@ struct WriterContext {
WriterContext(bool IsSparse, std::mutex &ErrLock,
SmallSet<instrprof_error, 4> &WriterErrorCodes)
: Lock(), Writer(IsSparse), Errors(), ErrLock(ErrLock),
WriterErrorCodes(WriterErrorCodes) {}
: Writer(IsSparse), ErrLock(ErrLock), WriterErrorCodes(WriterErrorCodes) {
}
};
/// Computer the overlap b/w profile BaseFilename and TestFileName,
@ -2303,8 +2303,7 @@ struct HotFuncInfo {
uint64_t EntryCount;
HotFuncInfo()
: FuncName(), TotalCount(0), TotalCountPercent(0.0f), MaxCount(0),
EntryCount(0) {}
: TotalCount(0), TotalCountPercent(0.0f), MaxCount(0), EntryCount(0) {}
HotFuncInfo(StringRef FN, uint64_t TS, double TSP, uint64_t MS, uint64_t ES)
: FuncName(FN.begin(), FN.end()), TotalCount(TS), TotalCountPercent(TSP),

View File

@ -286,8 +286,8 @@ static void parseOptions(const opt::InputArgList &Args) {
namespace {
struct ReadObjTypeTableBuilder {
ReadObjTypeTableBuilder()
: Allocator(), IDTable(Allocator), TypeTable(Allocator),
GlobalIDTable(Allocator), GlobalTypeTable(Allocator) {}
: IDTable(Allocator), TypeTable(Allocator), GlobalIDTable(Allocator),
GlobalTypeTable(Allocator) {}
llvm::BumpPtrAllocator Allocator;
llvm::codeview::MergingTypeTableBuilder IDTable;

View File

@ -84,9 +84,7 @@ protected:
bool HasPostMatchPredicate = false;
public:
GIMatchDag(GIMatchDagContext &Ctx)
: Ctx(Ctx), InstrNodes(), PredicateNodes(), Edges(),
PredicateDependencies() {}
GIMatchDag(GIMatchDagContext &Ctx) : Ctx(Ctx) {}
GIMatchDag(const GIMatchDag &) = delete;
GIMatchDagContext &getContext() const { return Ctx; }

View File

@ -82,7 +82,6 @@ GIMatchTreeBuilderLeafInfo::GIMatchTreeBuilderLeafInfo(
GIMatchTreeBuilder &Builder, StringRef Name, unsigned RootIdx,
const GIMatchDag &MatchDag, void *Data)
: Builder(Builder), Info(Name, RootIdx, Data), MatchDag(MatchDag),
InstrNodeToInfo(),
RemainingInstrNodes(BitVector(MatchDag.getNumInstrNodes(), true)),
RemainingEdges(BitVector(MatchDag.getNumEdges(), true)),
RemainingPredicates(BitVector(MatchDag.getNumPredicates(), true)),

View File

@ -883,9 +883,7 @@ protected:
public:
RuleMatcher(ArrayRef<SMLoc> SrcLoc)
: Matchers(), Actions(), InsnVariableIDs(), MutatableInsns(),
DefinedOperands(), NextInsnVarID(0), NextOutputInsnID(0),
NextTempRegID(0), SrcLoc(SrcLoc), ComplexSubOperands(),
: NextInsnVarID(0), NextOutputInsnID(0), NextTempRegID(0), SrcLoc(SrcLoc),
RuleID(NextRuleID++) {}
RuleMatcher(RuleMatcher &&Other) = default;
RuleMatcher &operator=(RuleMatcher &&Other) = default;

View File

@ -111,7 +111,7 @@ class STIPredicateExpander : public PredicateExpander {
public:
STIPredicateExpander(StringRef Target)
: PredicateExpander(Target), ClassPrefix(), ExpandDefinition(false) {}
: PredicateExpander(Target), ExpandDefinition(false) {}
bool shouldExpandDefinition() const { return ExpandDefinition; }
StringRef getClassPrefix() const { return ClassPrefix; }

View File

@ -42,7 +42,7 @@ private:
public:
RegisterBank(const Record &TheDef)
: TheDef(TheDef), RCs(), RCWithLargestRegsSize(nullptr) {}
: TheDef(TheDef), RCWithLargestRegsSize(nullptr) {}
/// Get the human-readable name for the bank.
StringRef getName() const { return TheDef.getValueAsString("Name"); }

View File

@ -73,10 +73,7 @@ public:
/// otherwise. The name r derives from the fact that the mod
/// bits indicate whether the R/M bits [bits 2-0] signify a
/// register or a memory operand.
ModFilter(bool r) :
ModRMFilter(),
R(r) {
}
ModFilter(bool r) : R(r) {}
bool accepts(uint8_t modRM) const override {
return (R == ((modRM & 0xc0) == 0xc0));
@ -95,11 +92,7 @@ public:
/// \param r True if the mod field must be set to 11; false otherwise.
/// The name is explained at ModFilter.
/// \param nnn The required value of the nnn field.
ExtendedFilter(bool r, uint8_t nnn) :
ModRMFilter(),
R(r),
NNN(nnn) {
}
ExtendedFilter(bool r, uint8_t nnn) : R(r), NNN(nnn) {}
bool accepts(uint8_t modRM) const override {
return (((R && ((modRM & 0xc0) == 0xc0)) ||
@ -120,11 +113,7 @@ public:
/// \param r True if the mod field must be set to 11; false otherwise.
/// The name is explained at ModFilter.
/// \param nnn The required value of the nnn field.
ExtendedRMFilter(bool r, uint8_t nnn) :
ModRMFilter(),
R(r),
NNN(nnn) {
}
ExtendedRMFilter(bool r, uint8_t nnn) : R(r), NNN(nnn) {}
bool accepts(uint8_t modRM) const override {
return ((R && ((modRM & 0xc0) == 0xc0)) &&
@ -140,10 +129,7 @@ public:
/// Constructor
///
/// \param modRM The required value of the full ModR/M byte.
ExactFilter(uint8_t modRM) :
ModRMFilter(),
ModRM(modRM) {
}
ExactFilter(uint8_t modRM) : ModRM(modRM) {}
bool accepts(uint8_t modRM) const override {
return (ModRM == modRM);