summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-04-25 08:47:37 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-04-25 08:47:37 +0000
commitf72ca86b716ef52186c533f82abe0c4da0dea116 (patch)
tree9ebe8f489fdbe871d57f9d05e222ebae62ed6f44
parentfd63b80486e7116fa133ebfa20fb4ace84d68a90 (diff)
downloadbcm5719-llvm-f72ca86b716ef52186c533f82abe0c4da0dea116.tar.gz
bcm5719-llvm-f72ca86b716ef52186c533f82abe0c4da0dea116.zip
ThinLTO: Move createNameAnonFunctionPass insertion in PassManagerBuilder (NFC)
It is just code motion, but makes more sense this way. From: Mehdi Amini <mehdi.amini@apple.com> llvm-svn: 267384
-rw-r--r--llvm/lib/Transforms/IPO/PassManagerBuilder.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
index cf1d3f26dc8..7867bf44a52 100644
--- a/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
+++ b/llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
@@ -249,8 +249,6 @@ void PassManagerBuilder::addFunctionSimplificationPasses(
if (PrepareForThinLTO) {
MPM.add(createAggressiveDCEPass()); // Delete dead instructions
addInstructionCombiningPass(MPM); // Combine silly seq's
- // Rename anon function to export them
- MPM.add(createNameAnonFunctionPass());
return;
}
// Rotate Loop - disable header duplication at -Oz
@@ -405,8 +403,11 @@ void PassManagerBuilder::populateModulePassManager(
// If we are planning to perform ThinLTO later, let's not bloat the code with
// unrolling/vectorization/... now. We'll first run the inliner + CGSCC passes
// during ThinLTO and perform the rest of the optimizations afterward.
- if (PrepareForThinLTO)
+ if (PrepareForThinLTO) {
+ // Rename anon function to be able to export them in the summary.
+ MPM.add(createNameAnonFunctionPass());
return;
+ }
// FIXME: This is a HACK! The inliner pass above implicitly creates a CGSCC
// pass manager that we are specifically trying to avoid. To prevent this
OpenPOWER on IntegriCloud