summaryrefslogtreecommitdiffstats
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
commitaee3ca6cfd4ff414786069776f747d5d6b6bc4a6 (patch)
treebd298b659db2115a36bb2152205d676192593f39
parent8346167fabeebc1888bce4bea1a3c3cbd981c5ef (diff)
downloadbcm5719-llvm-aee3ca6cfd4ff414786069776f747d5d6b6bc4a6.tar.gz
bcm5719-llvm-aee3ca6cfd4ff414786069776f747d5d6b6bc4a6.zip
[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. llvm-svn: 203437
-rw-r--r--llvm/include/llvm/Analysis/TargetTransformInfo.h5
-rw-r--r--llvm/lib/Analysis/TargetTransformInfo.cpp10
-rw-r--r--llvm/lib/CodeGen/BasicTargetTransformInfo.cpp4
-rw-r--r--llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp4
-rw-r--r--llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp4
-rw-r--r--llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp4
-rw-r--r--llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp2
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.cpp4
-rw-r--r--llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp4
9 files changed, 0 insertions, 41 deletions
diff --git a/llvm/include/llvm/Analysis/TargetTransformInfo.h b/llvm/include/llvm/Analysis/TargetTransformInfo.h
index 03ef8004c18..178d55305e2 100644
--- a/llvm/include/llvm/Analysis/TargetTransformInfo.h
+++ b/llvm/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/llvm/lib/Analysis/TargetTransformInfo.cpp b/llvm/lib/Analysis/TargetTransformInfo.cpp
index c27ba01c6bc..0dcdd12a409 100644
--- a/llvm/lib/Analysis/TargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp b/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
index 003f4c4c9e8..02cc31b6d2b 100644
--- a/llvm/lib/CodeGen/BasicTargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp b/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
index 5d54da84dee..ef50fd75f6b 100644
--- a/llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp b/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
index bf6df3e404a..d3b43cddcb6 100644
--- a/llvm/lib/Target/ARM/ARMTargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp b/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
index 22cdd66dbb5..984519c0793 100644
--- a/llvm/lib/Target/PowerPC/PPCTargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp b/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
index a335fc67f97..51225eb7f88 100644
--- a/llvm/lib/Target/R600/AMDGPUTargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 3dbfd741945..c2456e74adb 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/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/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp b/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp
index baaf3f7cfff..313d18d1f2f 100644
--- a/llvm/lib/Target/XCore/XCoreTargetTransformInfo.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud