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@apple.com>
llvm-svn: 268266
This commit is contained in:
Mehdi Amini 2016-05-02 18:03:33 +00:00
parent 341e293d67
commit 0ddf404cf4
1 changed files with 1 additions and 0 deletions

View File

@ -1153,6 +1153,7 @@ struct ReversePostOrderFunctionAttrs : public ModulePass {
void getAnalysisUsage(AnalysisUsage &AU) const override {
AU.setPreservesCFG();
AU.addRequired<CallGraphWrapperPass>();
AU.addPreserved<CallGraphWrapperPass>();
}
};
}