null.
For some reason some of the original TTI code supported a null target
machine. This seems to have been legacy, and I made matters worse when
refactoring this code by spreading that pattern further through the
various targets.
The TargetMachine can't actually be null, and it doesn't make sense to
support that use case. I've now consistently removed it and removed all
of the code trying to cope with that situation. This is probably good,
as several targets *didn't* cope with it being null despite the null
default argument in their constructors. =]
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@227734
91177308-0d34-0410-b5e6-
96231b3b80d8
typedef BasicTTIImplBase<BasicTTIImpl> BaseT;
public:
- explicit BasicTTIImpl(const TargetMachine *TM = nullptr);
+ explicit BasicTTIImpl(const TargetMachine *TM);
// Provide value semantics. MSVC requires that we spell all of these out.
BasicTTIImpl(const BasicTTIImpl &Arg)
};
public:
- explicit AArch64TTIImpl(const AArch64TargetMachine *TM = nullptr)
- : BaseT(TM), ST(TM ? TM->getSubtargetImpl() : nullptr),
- TLI(ST ? ST->getTargetLowering() : nullptr) {}
+ explicit AArch64TTIImpl(const AArch64TargetMachine *TM)
+ : BaseT(TM), ST(TM->getSubtargetImpl()), TLI(ST->getTargetLowering()) {}
// Provide value semantics. MSVC requires that we spell all of these out.
AArch64TTIImpl(const AArch64TTIImpl &Arg)
unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract);
public:
- explicit ARMTTIImpl(const ARMBaseTargetMachine *TM = nullptr)
- : BaseT(TM), ST(TM ? TM->getSubtargetImpl() : nullptr),
- TLI(ST ? ST->getTargetLowering() : nullptr) {}
+ explicit ARMTTIImpl(const ARMBaseTargetMachine *TM)
+ : BaseT(TM), ST(TM->getSubtargetImpl()), TLI(ST->getTargetLowering()) {}
// Provide value semantics. MSVC requires that we spell all of these out.
ARMTTIImpl(const ARMTTIImpl &Arg)
const NVPTXTargetLowering *TLI;
public:
- explicit NVPTXTTIImpl(const NVPTXTargetMachine *TM = nullptr)
- : BaseT(TM),
- TLI(TM ? TM->getSubtargetImpl()->getTargetLowering() : nullptr) {}
+ explicit NVPTXTTIImpl(const NVPTXTargetMachine *TM)
+ : BaseT(TM), TLI(TM->getSubtargetImpl()->getTargetLowering()) {}
// Provide value semantics. MSVC requires that we spell all of these out.
NVPTXTTIImpl(const NVPTXTTIImpl &Arg)
const PPCTargetLowering *TLI;
public:
- explicit PPCTTIImpl(const PPCTargetMachine *TM = nullptr)
+ explicit PPCTTIImpl(const PPCTargetMachine *TM)
: BaseT(TM), ST(TM->getSubtargetImpl()), TLI(ST->getTargetLowering()) {}
// Provide value semantics. MSVC requires that we spell all of these out.
const AMDGPUSubtarget *ST;
public:
- explicit AMDGPUTTIImpl(const AMDGPUTargetMachine *TM = nullptr)
+ explicit AMDGPUTTIImpl(const AMDGPUTargetMachine *TM)
: BaseT(TM), ST(TM->getSubtargetImpl()) {}
// Provide value semantics. MSVC requires that we spell all of these out.
unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract);
public:
- explicit X86TTIImpl(const X86TargetMachine *TM = nullptr)
- : BaseT(TM), ST(TM ? TM->getSubtargetImpl() : nullptr),
- TLI(ST ? ST->getTargetLowering() : nullptr) {}
+ explicit X86TTIImpl(const X86TargetMachine *TM)
+ : BaseT(TM), ST(TM->getSubtargetImpl()), TLI(ST->getTargetLowering()) {}
// Provide value semantics. MSVC requires that we spell all of these out.
X86TTIImpl(const X86TTIImpl &Arg)
typedef TargetTransformInfo TTI;
public:
- explicit XCoreTTIImpl(const XCoreTargetMachine *TM = nullptr) : BaseT(TM) {}
+ explicit XCoreTTIImpl(const XCoreTargetMachine *TM) : BaseT(TM) {}
// Provide value semantics. MSVC requires that we spell all of these out.
XCoreTTIImpl(const XCoreTTIImpl &Arg)