From 7b901e3907fc3c2c57cf8745a2bcdfa811183c46 Mon Sep 17 00:00:00 2001 From: Jingyue Wu Date: Tue, 11 Nov 2014 05:24:04 +0000 Subject: [PATCH] [NVPTX] Remove dead code in NVPTXTargetTransformInfo (NFC) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@221668 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp b/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp index b3a5b60c068..bcac6392a67 100644 --- a/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp +++ b/lib/Target/NVPTX/NVPTXTargetTransformInfo.cpp @@ -36,22 +36,12 @@ void initializeNVPTXTTIPass(PassRegistry &); namespace { class NVPTXTTI final : public ImmutablePass, public TargetTransformInfo { - const NVPTXTargetMachine *TM; - const NVPTXSubtarget *ST; - const NVPTXTargetLowering *TLI; - - /// Estimate the overhead of scalarizing an instruction. Insert and Extract - /// are set if the result needs to be inserted and/or extracted from vectors. - unsigned getScalarizationOverhead(Type *Ty, bool Insert, bool Extract) const; - public: - NVPTXTTI() : ImmutablePass(ID), TM(nullptr), ST(nullptr), TLI(nullptr) { + NVPTXTTI() : ImmutablePass(ID) { llvm_unreachable("This pass cannot be directly constructed"); } - NVPTXTTI(const NVPTXTargetMachine *TM) - : ImmutablePass(ID), TM(TM), ST(TM->getSubtargetImpl()), - TLI(TM->getSubtargetImpl()->getTargetLowering()) { + NVPTXTTI(const NVPTXTargetMachine *TM) : ImmutablePass(ID) { initializeNVPTXTTIPass(*PassRegistry::getPassRegistry()); }