summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorRong Xu <xur@google.com>2017-10-23 22:21:29 +0000
committerRong Xu <xur@google.com>2017-10-23 22:21:29 +0000
commite1f4245f8df65353efb59bb0a559c721ca3866d8 (patch)
treeda384d12ecc71b8359e4ac246a29ba2e83ca291d /llvm/lib
parent321e54f72d40aecd51f5db9e6d26c8db307e49a8 (diff)
downloadbcm5719-llvm-e1f4245f8df65353efb59bb0a559c721ca3866d8.tar.gz
bcm5719-llvm-e1f4245f8df65353efb59bb0a559c721ca3866d8.zip
[PM] Add pgo-memop-opt pass to the new pass manager
This pass adds pgo-memop-opt pass to the new pass manager. It is in the old pass manager but somehow left out in the new pass manager. Differential Revision: http://reviews.llvm.org/D39145 llvm-svn: 316384
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Passes/PassBuilder.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Passes/PassBuilder.cpp b/llvm/lib/Passes/PassBuilder.cpp
index c6ec97bdf6d..219c3835f47 100644
--- a/llvm/lib/Passes/PassBuilder.cpp
+++ b/llvm/lib/Passes/PassBuilder.cpp
@@ -362,6 +362,12 @@ PassBuilder::buildFunctionSimplificationPipeline(OptimizationLevel Level,
invokePeepholeEPCallbacks(FPM, Level);
+ // For PGO use pipeline, try to optimize memory intrinsics such as memcpy
+ // using the size value profile. Don't perform this when optimizing for size.
+ if (PGOOpt && !PGOOpt->ProfileUseFile.empty() &&
+ !isOptimizingForSize(Level))
+ FPM.addPass(PGOMemOPSizeOpt());
+
FPM.addPass(TailCallElimPass());
FPM.addPass(SimplifyCFGPass());
OpenPOWER on IntegriCloud