[X86] Use default member initialization (NFC)

Identified with modernize-use-default-member-init.
This commit is contained in:
Kazu Hirata 2022-06-18 12:11:58 -07:00
parent 1590d39f2e
commit 47b39c5157
1 changed files with 5 additions and 6 deletions

View File

@ -37,21 +37,20 @@ STATISTIC(NumBBsPadded, "Number of basic blocks padded");
namespace {
struct VisitedBBInfo {
// HasReturn - Whether the BB contains a return instruction
bool HasReturn;
bool HasReturn = false;
// Cycles - Number of cycles until return if HasReturn is true, otherwise
// number of cycles until end of the BB
unsigned int Cycles;
unsigned int Cycles = 0;
VisitedBBInfo() : HasReturn(false), Cycles(0) {}
VisitedBBInfo() = default;
VisitedBBInfo(bool HasReturn, unsigned int Cycles)
: HasReturn(HasReturn), Cycles(Cycles) {}
};
struct PadShortFunc : public MachineFunctionPass {
static char ID;
PadShortFunc() : MachineFunctionPass(ID)
, Threshold(4) {}
PadShortFunc() : MachineFunctionPass(ID) {}
bool runOnMachineFunction(MachineFunction &MF) override;
@ -82,7 +81,7 @@ namespace {
MachineBasicBlock::iterator &MBBI,
unsigned int NOOPsToAdd);
const unsigned int Threshold;
const unsigned int Threshold = 4;
// ReturnBBs - Maps basic blocks that return to the minimum number of
// cycles until the return, starting from the entry block.