[PATCH] D39145: [PM] Add pgo-memop-opt pass to the new pass manager
Rong Xu via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 23 15:22:02 PDT 2017
This revision was automatically updated to reflect the committed changes.
Closed by commit rL316384: [PM] Add pgo-memop-opt pass to the new pass manager (authored by xur).
Changed prior to commit:
https://reviews.llvm.org/D39145?vs=119916&id=119946#toc
Repository:
rL LLVM
https://reviews.llvm.org/D39145
Files:
llvm/trunk/lib/Passes/PassBuilder.cpp
llvm/trunk/test/Other/new-pm-pgo.ll
Index: llvm/trunk/test/Other/new-pm-pgo.ll
===================================================================
--- llvm/trunk/test/Other/new-pm-pgo.ll
+++ llvm/trunk/test/Other/new-pm-pgo.ll
@@ -11,6 +11,8 @@
;
; GEN: Running pass: PGOInstrumentationGen
; USE: Running pass: PGOInstrumentationUse
+; USE: Running pass: PGOIndirectCallPromotion
+; USE: Running pass: PGOMemOPSizeOpt
; SAMPLE_USE_O: Running pass: ModuleToFunctionPassAdaptor<{{.*}}AddDiscriminatorsPass{{.*}}>
; SAMPLE_USE_PRE_LINK: Running pass: ModuleToFunctionPassAdaptor<{{.*}}AddDiscriminatorsPass{{.*}}>
; SAMPLE_USE: Running pass: SimplifyCFGPass
Index: llvm/trunk/lib/Passes/PassBuilder.cpp
===================================================================
--- llvm/trunk/lib/Passes/PassBuilder.cpp
+++ llvm/trunk/lib/Passes/PassBuilder.cpp
@@ -362,6 +362,12 @@
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());
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D39145.119946.patch
Type: text/x-patch
Size: 1247 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171023/b2fa0789/attachment.bin>
More information about the llvm-commits
mailing list