Skip to content
Snippets Groups Projects
Commit dfd4eb92 authored by Jingyue Wu's avatar Jingyue Wu
Browse files

[NVPTX] Remove dead code in NVPTXTargetTransformInfo (NFC)

llvm-svn: 221668
parent 961d4694
No related branches found
No related tags found
No related merge requests found
...@@ -36,22 +36,12 @@ void initializeNVPTXTTIPass(PassRegistry &); ...@@ -36,22 +36,12 @@ void initializeNVPTXTTIPass(PassRegistry &);
namespace { namespace {
class NVPTXTTI final : public ImmutablePass, public TargetTransformInfo { 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: public:
NVPTXTTI() : ImmutablePass(ID), TM(nullptr), ST(nullptr), TLI(nullptr) { NVPTXTTI() : ImmutablePass(ID) {
llvm_unreachable("This pass cannot be directly constructed"); llvm_unreachable("This pass cannot be directly constructed");
} }
NVPTXTTI(const NVPTXTargetMachine *TM) NVPTXTTI(const NVPTXTargetMachine *TM) : ImmutablePass(ID) {
: ImmutablePass(ID), TM(TM), ST(TM->getSubtargetImpl()),
TLI(TM->getSubtargetImpl()->getTargetLowering()) {
initializeNVPTXTTIPass(*PassRegistry::getPassRegistry()); initializeNVPTXTTIPass(*PassRegistry::getPassRegistry());
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment