[llvm] r268266 - ReversePostOrderFunctionAttrs is not modifying the call graph, let's preserve it.
Mehdi Amini via llvm-commits
llvm-commits at lists.llvm.org
Mon May 2 11:03:34 PDT 2016
Author: mehdi_amini
Date: Mon May 2 13:03:33 2016
New Revision: 268266
URL: http://llvm.org/viewvc/llvm-project?rev=268266&view=rev
Log:
ReversePostOrderFunctionAttrs is not modifying the call graph, let's preserve it.
When running cc1 with -flto=thin, it is followed by GlobalOpt, which
requires the callgraph. This saves rebuilding one.
From: Mehdi Amini <mehdi.amini at apple.com>
Modified:
llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
Modified: llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp?rev=268266&r1=268265&r2=268266&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp (original)
+++ llvm/trunk/lib/Transforms/IPO/FunctionAttrs.cpp Mon May 2 13:03:33 2016
@@ -1153,6 +1153,7 @@ struct ReversePostOrderFunctionAttrs : p
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();
AU.addRequired<CallGraphWrapperPass>();
+ AU.addPreserved<CallGraphWrapperPass>();
}
};
}
More information about the llvm-commits
mailing list