ScalarRepl does not modify the CFG. Say so!
authorChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 00:45:13 +0000 (00:45 +0000)
committerChris Lattner <sabre@nondot.org>
Sun, 31 Aug 2003 00:45:13 +0000 (00:45 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8243 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Transforms/Scalar/ScalarReplAggregates.cpp

index e59a6e58ef09b8cf43891adc49ce2c10cbe1fd9c..864f8764aa528bf700b7c9c4f6a06fc9846ed148 100644 (file)
@@ -23,6 +23,12 @@ namespace {
   struct SROA : public FunctionPass {
     bool runOnFunction(Function &F);
 
+    // getAnalysisUsage - This pass does not require any passes, but we know it
+    // will not alter the CFG, so say so.
+    virtual void getAnalysisUsage(AnalysisUsage &AU) const {
+      AU.setPreservesCFG();
+    }
+
   private:
     bool isSafeElementUse(Value *Ptr);
     bool isSafeUseOfAllocation(Instruction *User);