]> granicus.if.org Git - llvm/commit
[PGO] Profile guided code size optimization.
authorHiroshi Yamauchi <yamauchi@google.com>
Mon, 15 Apr 2019 16:49:00 +0000 (16:49 +0000)
committerHiroshi Yamauchi <yamauchi@google.com>
Mon, 15 Apr 2019 16:49:00 +0000 (16:49 +0000)
commit7716d6596884a7d1fb87f3ecba3ab31a97e283d4
tree62fef887cca114dbc37530273fcfd4ca39bdfc10
parent6900134167b2c456705b577d6a9b3b5a455df7e1
[PGO] Profile guided code size optimization.

Summary:
Enable some of the existing size optimizations for cold code under PGO.

A ~5% code size saving in big internal app under PGO.

The way it gets BFI/PSI is discussed in the RFC thread

http://lists.llvm.org/pipermail/llvm-dev/2019-March/130894.html

Note it doesn't currently touch loop passes.

Reviewers: davidxl, eraman

Reviewed By: eraman

Subscribers: mgorny, javed.absar, smeenai, mehdi_amini, eraman, zzheng, steven_wu, dexonsmith, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D59514

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@358422 91177308-0d34-0410-b5e6-96231b3b80d8
28 files changed:
include/llvm/Transforms/Scalar/ConstantHoisting.h
include/llvm/Transforms/Utils/SimplifyLibCalls.h
include/llvm/Transforms/Utils/SizeOpts.h [new file with mode: 0644]
include/llvm/Transforms/Utils/UnrollLoop.h
include/llvm/Transforms/Vectorize/LoopVectorize.h
lib/Passes/PassBuilder.cpp
lib/Transforms/InstCombine/InstCombineCalls.cpp
lib/Transforms/InstCombine/InstCombineInternal.h
lib/Transforms/InstCombine/InstructionCombining.cpp
lib/Transforms/Scalar/ConstantHoisting.cpp
lib/Transforms/Scalar/LoopLoadElimination.cpp
lib/Transforms/Scalar/LoopUnrollAndJamPass.cpp
lib/Transforms/Scalar/LoopUnrollPass.cpp
lib/Transforms/Utils/CMakeLists.txt
lib/Transforms/Utils/SimplifyLibCalls.cpp
lib/Transforms/Utils/SizeOpts.cpp [new file with mode: 0644]
lib/Transforms/Vectorize/LoopVectorize.cpp
test/Other/new-pm-defaults.ll
test/Other/new-pm-lto-defaults.ll
test/Other/new-pm-thinlto-defaults.ll
test/Other/opt-O2-pipeline.ll
test/Other/opt-O3-pipeline.ll
test/Other/opt-Os-pipeline.ll
test/Transforms/ConstantHoisting/ARM/const-addr-no-neg-offset.ll
test/Transforms/InstCombine/fputs-opt-size.ll
test/Transforms/LoopLoadElim/opt-size.ll
test/Transforms/LoopUnroll/unroll-opt-attribute.ll
test/Transforms/LoopVectorize/optsize.ll