[TTI] There is actually no realistic way to pop TTI implementations off
authorChandler Carruth <chandlerc@gmail.com>
Mon, 10 Mar 2014 02:45:14 +0000 (02:45 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Mon, 10 Mar 2014 02:45:14 +0000 (02:45 +0000)
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

include/llvm/Analysis/TargetTransformInfo.h
lib/Analysis/TargetTransformInfo.cpp
lib/CodeGen/BasicTargetTransformInfo.cpp
lib/Target/AArch64/AArch64TargetTransformInfo.cpp
lib/Target/ARM/ARMTargetTransformInfo.cpp
lib/Target/PowerPC/PPCTargetTransformInfo.cpp
lib/Target/R600/AMDGPUTargetTransformInfo.cpp
lib/Target/X86/X86TargetTransformInfo.cpp
lib/Target/XCore/XCoreTargetTransformInfo.cpp

index 03ef8004c183b87f4a669dab2401bf53603a3cd7..178d55305e20a29b3815d2083e2f72f25a99a86c 100644 (file)
@@ -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;
 
index c27ba01c6bcf19ff9158cf76d1913f48a7fbaaf2..0dcdd12a4099bdbdd00cc3b627679a3eed37a50d 100644 (file)
@@ -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>();
 }
index 003f4c4c9e877ce92389cf5d5aa65f9f74c6ced0..02cc31b6d2b19da5a1d9c8e039a70e7bbea39617 100644 (file)
@@ -47,10 +47,6 @@ public:
     pushTTIStack(this);
   }
 
-  virtual void finalizePass() {
-    popTTIStack();
-  }
-
   virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
     TargetTransformInfo::getAnalysisUsage(AU);
   }
index 5d54da84deee0e0c282dd98d451bde217316a5d6..ef50fd75f6b1feaa6a59b7cd7b5e921ebbe8325a 100644 (file)
@@ -56,10 +56,6 @@ public:
     pushTTIStack(this);
   }
 
-  virtual void finalizePass() {
-    popTTIStack();
-  }
-
   virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
     TargetTransformInfo::getAnalysisUsage(AU);
   }
index bf6df3e404a6550d398f544c67bae560bb85c6d4..d3b43cddcb6cff9a145ad267c19836d16a681b62 100644 (file)
@@ -56,10 +56,6 @@ public:
     pushTTIStack(this);
   }
 
-  virtual void finalizePass() {
-    popTTIStack();
-  }
-
   void getAnalysisUsage(AnalysisUsage &AU) const override {
     TargetTransformInfo::getAnalysisUsage(AU);
   }
index 22cdd66dbb5632fd09eeb21c5ebeefd71dfe6d03..984519c0793782e7818117ba60cc707287722f25 100644 (file)
@@ -56,10 +56,6 @@ public:
     pushTTIStack(this);
   }
 
-  virtual void finalizePass() {
-    popTTIStack();
-  }
-
   virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
     TargetTransformInfo::getAnalysisUsage(AU);
   }
index a335fc67f97eccc455c5ecddff749aab96ac9fe4..51225eb7f881ac5739e8728c1b9311f40fa47102 100644 (file)
@@ -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);
   }
index 3dbfd741945513a642f4379a28baed5911222d3d..c2456e74adbf47e1635a36f1f6508c6a89491df7 100644 (file)
@@ -56,10 +56,6 @@ public:
     pushTTIStack(this);
   }
 
-  virtual void finalizePass() {
-    popTTIStack();
-  }
-
   virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
     TargetTransformInfo::getAnalysisUsage(AU);
   }
index baaf3f7cfffcd36c4950a92c816fca52325b8d8d..313d18d1f2fa55005d4628b041d148c6151c4dc3 100644 (file)
@@ -46,10 +46,6 @@ public:
     pushTTIStack(this);
   }
 
-  virtual void finalizePass() {
-    popTTIStack();
-  }
-
   virtual void getAnalysisUsage(AnalysisUsage &AU) const override {
     TargetTransformInfo::getAnalysisUsage(AU);
   }