[ARM] Use member initializers in ARMSubtarget. NFCI

Move most of the initializations in ARMSubtarget::initializeEnvironment to
member initializers.

Change suggested by Matthias Braun (see http://reviews.llvm.org/D21432).

llvm-svn: 273556
This commit is contained in:
Diana Picus 2016-06-23 12:04:33 +00:00
parent 8e17bea7d5
commit eb3dd14b95
1 changed files with 22 additions and 66 deletions

View File

@ -90,7 +90,28 @@ ARMSubtarget::ARMSubtarget(const Triple &TT, const std::string &CPU,
const std::string &FS,
const ARMBaseTargetMachine &TM, bool IsLittle)
: ARMGenSubtargetInfo(TT, CPU, FS), ARMProcFamily(Others),
ARMProcClass(None), ARMArch(ARMv4t), stackAlignment(4), CPUString(CPU),
ARMProcClass(None), ARMArch(ARMv4t), HasV4TOps(false), HasV5TOps(false),
HasV5TEOps(false), HasV6Ops(false), HasV6MOps(false), HasV6KOps(false),
HasV6T2Ops(false), HasV7Ops(false), HasV8Ops(false), HasV8_1aOps(false),
HasV8_2aOps(false), HasV8MBaselineOps(false), HasV8MMainlineOps(false),
HasVFPv2(false), HasVFPv3(false), HasVFPv4(false), HasFPARMv8(false),
HasNEON(false), UseNEONForSinglePrecisionFP(false),
UseMulOps(UseFusedMulOps), SlowFPVMLx(false), HasVMLxForwarding(false),
SlowFPBrcc(false), InThumbMode(false), UseSoftFloat(false),
HasThumb2(false), NoARM(false), ReserveR9(false), NoMovt(false),
SupportsTailCall(false), HasFP16(false), HasFullFP16(false),
HasD16(false), HasHardwareDivide(false), HasHardwareDivideInARM(false),
HasT2ExtractPack(false), HasDataBarrier(false), HasV7Clrex(false),
HasAcquireRelease(false), Pref32BitThumb(false),
AvoidCPSRPartialUpdate(false), AvoidMOVsShifterOperand(false),
HasRetAddrStack(false), HasMPExtension(false), HasVirtualization(false),
FPOnlySP(false), HasPerfMon(false), HasTrustZone(false),
Has8MSecExt(false), HasCrypto(false), HasCRC(false), HasRAS(false),
HasZeroCycleZeroing(false), IsProfitableToUnpredicate(false),
HasSlowVGETLNi32(false), HasSlowVDUP32(false), PreferVMOVSR(false),
PreferISHST(false), UseNEONForFPMovs(false), StrictAlign(false),
RestrictIT(false), HasDSP(false), UseNaClTrap(false), GenLongCalls(false),
UnsafeFPMath(false), UseSjLjEH(false), stackAlignment(4), CPUString(CPU),
IsLittle(IsLittle), TargetTriple(TT), Options(TM.Options), TM(TM),
FrameLowering(initializeFrameLowering(CPU, FS)),
// At this point initializeSubtargetDependencies has been called so
@ -103,71 +124,6 @@ ARMSubtarget::ARMSubtarget(const Triple &TT, const std::string &CPU,
TLInfo(TM, *this) {}
void ARMSubtarget::initializeEnvironment() {
HasV4TOps = false;
HasV5TOps = false;
HasV5TEOps = false;
HasV6Ops = false;
HasV6MOps = false;
HasV6KOps = false;
HasV6T2Ops = false;
HasV7Ops = false;
HasV8Ops = false;
HasV8_1aOps = false;
HasV8_2aOps = false;
HasV8MBaselineOps = false;
HasV8MMainlineOps = false;
HasVFPv2 = false;
HasVFPv3 = false;
HasVFPv4 = false;
HasFPARMv8 = false;
HasNEON = false;
UseNEONForSinglePrecisionFP = false;
UseMulOps = UseFusedMulOps;
SlowFPVMLx = false;
HasVMLxForwarding = false;
SlowFPBrcc = false;
InThumbMode = false;
UseSoftFloat = false;
HasThumb2 = false;
NoARM = false;
ReserveR9 = false;
NoMovt = false;
SupportsTailCall = false;
HasFP16 = false;
HasFullFP16 = false;
HasD16 = false;
HasHardwareDivide = false;
HasHardwareDivideInARM = false;
HasT2ExtractPack = false;
HasDataBarrier = false;
Pref32BitThumb = false;
AvoidCPSRPartialUpdate = false;
AvoidMOVsShifterOperand = false;
HasRetAddrStack = false;
HasMPExtension = false;
HasVirtualization = false;
FPOnlySP = false;
HasPerfMon = false;
HasTrustZone = false;
Has8MSecExt = false;
HasCrypto = false;
HasCRC = false;
HasRAS = false;
HasZeroCycleZeroing = false;
IsProfitableToUnpredicate = false;
HasSlowVGETLNi32 = false;
HasSlowVDUP32 = false;
PreferVMOVSR = false;
PreferISHST = false;
UseNEONForFPMovs = false;
StrictAlign = false;
HasDSP = false;
UseNaClTrap = false;
GenLongCalls = false;
UnsafeFPMath = false;
HasV7Clrex = false;
HasAcquireRelease = false;
// MCAsmInfo isn't always present (e.g. in opt) so we can't initialize this
// directly from it, but we can try to make sure they're consistent when both
// available.