[PATCH] D36040: Refine the PGOOpt and SamplePGOSupport handling.

Dehao Chen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 28 17:32:55 PDT 2017


danielcdh created this revision.
Herald added subscribers: eraman, mehdi_amini, sanjoy.

Now that SamplePGOSupport is part of PGOOpt, there are several places that need tweaking:

1. AddDiscriminator pass should *not* be invoked at ThinLTOBackend (as it's already invoked in the PreLink phase)
2. addPGOInstrPasses should only be invoked when either ProfileGenFile or ProfileUseFile is non-empty.
3. SampleProfileLoaderPass should only be invoked when SampleProfileFile is non-empty.
4. PGOIndirectCallPromotion should only be invoked in ProfileUse phase, or in ThinLTOBackend of SamplePGO.


https://reviews.llvm.org/D36040

Files:
  include/llvm/Passes/PassBuilder.h
  lib/Passes/PassBuilder.cpp
  test/Other/new-pm-thinlto-defaults.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D36040.108756.patch
Type: text/x-patch
Size: 6409 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170729/1f66cc90/attachment.bin>


More information about the llvm-commits mailing list