summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/X86TargetTransformInfo.h
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2015-02-01 12:38:24 +0000
committerChandler Carruth <chandlerc@gmail.com>2015-02-01 12:38:24 +0000
commitee642690ea9052e57cf09a798dda465d0c11db7f (patch)
treef659ad2a1e96228043209e9fe008bf61e3f1a48f /llvm/lib/Target/X86/X86TargetTransformInfo.h
parent6ab86b1bb6bbffb6fdd6241cb87ac18c33b8453e (diff)
downloadbcm5719-llvm-ee642690ea9052e57cf09a798dda465d0c11db7f.tar.gz
bcm5719-llvm-ee642690ea9052e57cf09a798dda465d0c11db7f.zip
[multiversion] Remove a false freedom to leave the TargetMachine pointer
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. =] llvm-svn: 227734
Diffstat (limited to 'llvm/lib/Target/X86/X86TargetTransformInfo.h')
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.h5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.h b/llvm/lib/Target/X86/X86TargetTransformInfo.h
index bb45cd7c2cf..c77452b0a56 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.h
+++ b/llvm/lib/Target/X86/X86TargetTransformInfo.h
@@ -35,9 +35,8 @@ class X86TTIImpl : public BasicTTIImplBase<X86TTIImpl> {
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)
OpenPOWER on IntegriCloud