From: Chris Lattner Date: Sun, 31 Aug 2003 00:45:13 +0000 (+0000) Subject: ScalarRepl does not modify the CFG. Say so! X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=a15854c9febcb60eb107048640b04abff8cc47e5;p=oota-llvm.git ScalarRepl does not modify the CFG. Say so! git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@8243 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/ScalarReplAggregates.cpp b/lib/Transforms/Scalar/ScalarReplAggregates.cpp index e59a6e58ef0..864f8764aa5 100644 --- a/lib/Transforms/Scalar/ScalarReplAggregates.cpp +++ b/lib/Transforms/Scalar/ScalarReplAggregates.cpp @@ -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);