forked from OSchip/llvm-project
[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
This commit is contained in:
parent
8346167fab
commit
aee3ca6cfd
|
@ -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;
|
||||
|
||||
|
|
|
@ -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>();
|
||||
}
|
||||
|
|
|
@ -47,10 +47,6 @@ public:
|
|||
pushTTIStack(this);
|
||||
}
|
||||
|
||||
virtual void finalizePass() {
|
||||
popTTIStack();
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
TargetTransformInfo::getAnalysisUsage(AU);
|
||||
}
|
||||
|
|
|
@ -56,10 +56,6 @@ public:
|
|||
pushTTIStack(this);
|
||||
}
|
||||
|
||||
virtual void finalizePass() {
|
||||
popTTIStack();
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
TargetTransformInfo::getAnalysisUsage(AU);
|
||||
}
|
||||
|
|
|
@ -56,10 +56,6 @@ public:
|
|||
pushTTIStack(this);
|
||||
}
|
||||
|
||||
virtual void finalizePass() {
|
||||
popTTIStack();
|
||||
}
|
||||
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
TargetTransformInfo::getAnalysisUsage(AU);
|
||||
}
|
||||
|
|
|
@ -56,10 +56,6 @@ public:
|
|||
pushTTIStack(this);
|
||||
}
|
||||
|
||||
virtual void finalizePass() {
|
||||
popTTIStack();
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
TargetTransformInfo::getAnalysisUsage(AU);
|
||||
}
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
|
|
@ -56,10 +56,6 @@ public:
|
|||
pushTTIStack(this);
|
||||
}
|
||||
|
||||
virtual void finalizePass() {
|
||||
popTTIStack();
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
TargetTransformInfo::getAnalysisUsage(AU);
|
||||
}
|
||||
|
|
|
@ -46,10 +46,6 @@ public:
|
|||
pushTTIStack(this);
|
||||
}
|
||||
|
||||
virtual void finalizePass() {
|
||||
popTTIStack();
|
||||
}
|
||||
|
||||
virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
TargetTransformInfo::getAnalysisUsage(AU);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue