X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTarget%2FXCore%2FXCoreTargetTransformInfo.h;h=b2cb889f1fc0953dc4b9a0c1bc8cea0d3df105a0;hb=1422e1f158810323cfbe06d9242ba35c3f674921;hp=5c2f36ff395e9e364b6fbb41aeead5a71755f5dc;hpb=1937233a222144826216aad1eb18ccbbd2ea3ecd;p=oota-llvm.git diff --git a/lib/Target/XCore/XCoreTargetTransformInfo.h b/lib/Target/XCore/XCoreTargetTransformInfo.h index 5c2f36ff395..b2cb889f1fc 100644 --- a/lib/Target/XCore/XCoreTargetTransformInfo.h +++ b/lib/Target/XCore/XCoreTargetTransformInfo.h @@ -28,23 +28,25 @@ namespace llvm { class XCoreTTIImpl : public BasicTTIImplBase { typedef BasicTTIImplBase BaseT; typedef TargetTransformInfo TTI; + friend BaseT; + + const XCoreSubtarget *ST; + const XCoreTargetLowering *TLI; + + const XCoreSubtarget *getST() const { return ST; } + const XCoreTargetLowering *getTLI() const { return TLI; } public: - explicit XCoreTTIImpl(const XCoreTargetMachine *TM = nullptr) : BaseT(TM) {} + explicit XCoreTTIImpl(const XCoreTargetMachine *TM, const Function &F) + : BaseT(TM, F.getParent()->getDataLayout()), ST(TM->getSubtargetImpl()), + TLI(ST->getTargetLowering()) {} // Provide value semantics. MSVC requires that we spell all of these out. XCoreTTIImpl(const XCoreTTIImpl &Arg) - : BaseT(static_cast(Arg)) {} + : BaseT(static_cast(Arg)), ST(Arg.ST), TLI(Arg.TLI) {} XCoreTTIImpl(XCoreTTIImpl &&Arg) - : BaseT(std::move(static_cast(Arg))) {} - XCoreTTIImpl &operator=(const XCoreTTIImpl &RHS) { - BaseT::operator=(static_cast(RHS)); - return *this; - } - XCoreTTIImpl &operator=(XCoreTTIImpl &&RHS) { - BaseT::operator=(std::move(static_cast(RHS))); - return *this; - } + : BaseT(std::move(static_cast(Arg))), ST(std::move(Arg.ST)), + TLI(std::move(Arg.TLI)) {} unsigned getNumberOfRegisters(bool Vector) { if (Vector) {