summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChandler Carruth <chandlerc@gmail.com>2014-03-10 02:45:14 +0000
committerChandler Carruth <chandlerc@gmail.com>2014-03-10 02:45:14 +0000
commit436906ab3cbe991826a8967f2c3c14850d267cbf (patch)
treeabbb50957f8a22f9cd77651503dfb12bc0256cbd
parent804ff192731d217fc82d4e63070dda060de02ebe (diff)
downloadllvm-436906ab3cbe991826a8967f2c3c14850d267cbf.tar.gz
llvm-436906ab3cbe991826a8967f2c3c14850d267cbf.tar.bz2
llvm-436906ab3cbe991826a8967f2c3c14850d267cbf.tar.xz
[TTI] There is actually no realistic way to pop TTI implementations off
the stack of the analysis group because they are all immutable passes. This is made clear by Craig's recent work to use override systematically -- we weren't overriding anything for 'finalizePass' because there is no such thing. This is kind of a lame restriction on the API -- we can no longer push and pop things, we just set up the stack and run. However, I'm not invested in building some better solution on top of the existing (terrifying) immutable pass and legacy pass manager. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@203437 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/llvm/Analysis/TargetTransformInfo.h5
-rw-r--r--lib/Analysis/TargetTransformInfo.cpp10
-rw-r--r--lib/CodeGen/BasicTargetTransformInfo.cpp4
-rw-r--r--lib/Target/AArch64/AArch64TargetTransformInfo.cpp4
-rw-r--r--lib/Target/ARM/ARMTargetTransformInfo.cpp4
-rw-r--r--lib/Target/PowerPC/PPCTargetTransformInfo.cpp4
-rw-r--r--lib/Target/R600/AMDGPUTargetTransformInfo.cpp2
-rw-r--r--lib/Target/X86/X86TargetTransformInfo.cpp4
-rw-r--r--lib/Target/XCore/XCoreTargetTransformInfo.cpp4
9 files changed, 0 insertions, 41 deletions
diff --git a/include/llvm/Analysis/TargetTransformInfo.h b/include/llvm/Analysis/TargetTransformInfo.h
index 03ef8004c1..178d55305e 100644
--- a/include/llvm/Analysis/TargetTransformInfo.h
+++ b/include/llvm/Analysis/TargetTransformInfo.h
@@ -59,11 +59,6 @@ protected:
/// group's stack.
void pushTTIStack(Pass *P);
- /// All pass subclasses must in their finalizePass routine call popTTIStack
- /// to update the pointers tracking the previous TTI instance in the analysis
- /// group's stack, and the top of the analysis group's stack.
- void popTTIStack();
-
/// All pass subclasses must call TargetTransformInfo::getAnalysisUsage.
virtual void getAnalysisUsage(AnalysisUsage &AU) const;
diff --git a/lib/Analysis/TargetTransformInfo.cpp b/lib/Analysis/TargetTransformInfo.cpp
index c27ba01c6b..0dcdd12a40 100644
--- a/lib/Analysis/TargetTransformInfo.cpp
+++ b/lib/Analysis/TargetTransformInfo.cpp
@@ -35,16 +35,6 @@ void TargetTransformInfo::pushTTIStack(Pass *P) {
PTTI->TopTTI = this;
}
-void TargetTransformInfo::popTTIStack() {
- TopTTI = 0;
-
- // Walk up the chain and update the top TTI pointer.
- for (TargetTransformInfo *PTTI = PrevTTI; PTTI; PTTI = PTTI->PrevTTI)
- PTTI->TopTTI = PrevTTI;
-
- PrevTTI = 0;
-}
-
void TargetTransformInfo::getAnalysisUsage(AnalysisUsage &AU) const {
AU.addRequired<TargetTransformInfo>();
}
diff --git a/lib/CodeGen/BasicTargetTransformInfo.cpp b/lib/CodeGen/BasicTargetTransformInfo.cpp
index 003f4c4c9e..02cc31b6d2 100644
--- a/lib/CodeGen/BasicTargetTransformInfo.cpp
+++ b/lib/CodeGen/BasicTargetTransformInfo.cpp
@@ -47,10 +47,6 @@ public:
pushTTIStack(this);
}
- virtual void finalizePass() {
- popTTIStack();
- }
-
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}
diff --git a/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 5d54da84de..ef50fd75f6 100644
--- a/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
@@ -56,10 +56,6 @@ public:
pushTTIStack(this);
}
- virtual void finalizePass() {
- popTTIStack();
- }
-
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}
diff --git a/lib/Target/ARM/ARMTargetTransformInfo.cpp b/lib/Target/ARM/ARMTargetTransformInfo.cpp
index bf6df3e404..d3b43cddcb 100644
--- a/lib/Target/ARM/ARMTargetTransformInfo.cpp
+++ b/lib/Target/ARM/ARMTargetTransformInfo.cpp
@@ -56,10 +56,6 @@ public:
pushTTIStack(this);
}
- virtual void finalizePass() {
- popTTIStack();
- }
-
void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}
diff --git a/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 22cdd66dbb..984519c079 100644
--- a/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
@@ -56,10 +56,6 @@ public:
pushTTIStack(this);
}
- virtual void finalizePass() {
- popTTIStack();
- }
-
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}
diff --git a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
index a335fc67f9..51225eb7f8 100644
--- a/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
+++ b/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
@@ -57,8 +57,6 @@ public:
virtual void initializePass() override { pushTTIStack(this); }
- virtual void finalizePass() { popTTIStack(); }
-
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}
diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp
index 3dbfd74194..c2456e74ad 100644
--- a/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/lib/Target/X86/X86TargetTransformInfo.cpp
@@ -56,10 +56,6 @@ public:
pushTTIStack(this);
}
- virtual void finalizePass() {
- popTTIStack();
- }
-
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}
diff --git a/lib/Target/XCore/XCoreTargetTransformInfo.cpp b/lib/Target/XCore/XCoreTargetTransformInfo.cpp
index baaf3f7cff..313d18d1f2 100644
--- a/lib/Target/XCore/XCoreTargetTransformInfo.cpp
+++ b/lib/Target/XCore/XCoreTargetTransformInfo.cpp
@@ -46,10 +46,6 @@ public:
pushTTIStack(this);
}
- virtual void finalizePass() {
- popTTIStack();
- }
-
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
TargetTransformInfo::getAnalysisUsage(AU);
}