[all-commits] [llvm/llvm-project] 273c29: [PM/CC1] Add -f[no-]split-cold-code CC1 option to ...
Vedant Kumar via All-commits
all-commits at lists.llvm.org
Thu Oct 15 16:15:48 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: 273c299d5d649a0222fbde03c9a41e41913751b4
https://github.com/llvm/llvm-project/commit/273c299d5d649a0222fbde03c9a41e41913751b4
Author: Vedant Kumar <vsk at apple.com>
Date: 2020-10-15 (Thu, 15 Oct 2020)
Changed paths:
M clang/include/clang/Basic/CodeGenOptions.def
M clang/include/clang/Basic/DiagnosticFrontendKinds.td
M clang/include/clang/Driver/Options.td
M clang/lib/CodeGen/CodeGenModule.cpp
M clang/lib/Frontend/CompilerInvocation.cpp
A clang/test/CodeGen/split-cold-code.c
A clang/test/Frontend/split-cold-code.c
M llvm/include/llvm/Transforms/IPO/HotColdSplitting.h
M llvm/lib/Passes/PassBuilder.cpp
M llvm/lib/Transforms/IPO/HotColdSplitting.cpp
M llvm/lib/Transforms/IPO/PassManagerBuilder.cpp
M llvm/test/CodeGen/AMDGPU/opt-pipeline.ll
M llvm/test/Other/X86/lto-hot-cold-split.ll
M llvm/test/Other/new-pm-defaults.ll
M llvm/test/Other/new-pm-lto-defaults.ll
M llvm/test/Other/new-pm-pgo.ll
M llvm/test/Other/new-pm-thinlto-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-pgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-samplepgo-defaults.ll
M llvm/test/Other/opt-O2-pipeline.ll
M llvm/test/Other/opt-O3-pipeline-enable-matrix.ll
M llvm/test/Other/opt-O3-pipeline.ll
M llvm/test/Other/opt-Os-pipeline.ll
M llvm/test/Other/opt-hot-cold-split.ll
M llvm/test/Other/pass-pipelines.ll
M llvm/test/Transforms/CodeExtractor/extract-assume.ll
M llvm/test/Transforms/HotColdSplit/X86/do-not-split.ll
M llvm/test/Transforms/HotColdSplit/addr-taken.ll
M llvm/test/Transforms/HotColdSplit/apply-noreturn-bonus.ll
M llvm/test/Transforms/HotColdSplit/apply-penalty-for-inputs.ll
M llvm/test/Transforms/HotColdSplit/apply-penalty-for-outputs.ll
M llvm/test/Transforms/HotColdSplit/apply-successor-penalty.ll
M llvm/test/Transforms/HotColdSplit/assumption-cache-invalidation.ll
M llvm/test/Transforms/HotColdSplit/coldentrycount.ll
M llvm/test/Transforms/HotColdSplit/delete-use-without-def-dbg-val.ll
M llvm/test/Transforms/HotColdSplit/duplicate-phi-preds-crash.ll
M llvm/test/Transforms/HotColdSplit/eh-pads.ll
M llvm/test/Transforms/HotColdSplit/eh-typeid-for.ll
M llvm/test/Transforms/HotColdSplit/forward-dfs-reaches-marked-block.ll
M llvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-1.ll
M llvm/test/Transforms/HotColdSplit/lifetime-markers-on-inputs-2.ll
M llvm/test/Transforms/HotColdSplit/mark-the-whole-func-cold.ll
M llvm/test/Transforms/HotColdSplit/minsize.ll
M llvm/test/Transforms/HotColdSplit/multiple-exits.ll
M llvm/test/Transforms/HotColdSplit/noreturn.ll
M llvm/test/Transforms/HotColdSplit/outline-cold-asm.ll
M llvm/test/Transforms/HotColdSplit/outline-disjoint-diamonds.ll
M llvm/test/Transforms/HotColdSplit/outline-if-then-else.ll
M llvm/test/Transforms/HotColdSplit/outline-multiple-entry-region.ll
M llvm/test/Transforms/HotColdSplit/outline-while-loop.ll
M llvm/test/Transforms/HotColdSplit/phi-with-distinct-outlined-values.ll
M llvm/test/Transforms/HotColdSplit/region-overlap.ll
M llvm/test/Transforms/HotColdSplit/resume.ll
M llvm/test/Transforms/HotColdSplit/retain-section.ll
M llvm/test/Transforms/HotColdSplit/section-splitting-custom.ll
M llvm/test/Transforms/HotColdSplit/section-splitting-default.ll
M llvm/test/Transforms/HotColdSplit/split-cold-2.ll
M llvm/test/Transforms/HotColdSplit/split-out-dbg-label.ll
M llvm/test/Transforms/HotColdSplit/split-out-dbg-val-of-arg.ll
M llvm/test/Transforms/HotColdSplit/split-phis-in-exit-blocks.ll
M llvm/test/Transforms/HotColdSplit/stale-assume-in-original-func.ll
M llvm/test/Transforms/HotColdSplit/succ-block-with-self-edge.ll
M llvm/test/Transforms/HotColdSplit/swifterror.ll
M llvm/test/Transforms/HotColdSplit/transfer-debug-info.ll
M llvm/test/Transforms/HotColdSplit/unwind.ll
M llvm/test/Transforms/HotColdSplit/update-split-loop-metadata.ll
M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll
M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.generated.expected
M llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/generated_funcs.ll.nogenerated.expected
Log Message:
-----------
[PM/CC1] Add -f[no-]split-cold-code CC1 option to toggle splitting
This patch adds -f[no-]split-cold-code CC1 options to clang. This allows
the splitting pass to be toggled on/off. The current method of passing
`-mllvm -hot-cold-split=true` to clang isn't ideal as it may not compose
correctly (say, with `-O0` or `-Oz`).
To implement the -fsplit-cold-code option, an attribute is applied to
functions to indicate that they may be considered for splitting. This
removes some complexity from the old/new PM pipeline builders, and
behaves as expected when LTO is enabled.
Co-authored by: Saleem Abdulrasool <compnerd at compnerd.org>
Differential Revision: https://reviews.llvm.org/D57265
Reviewed By: Aditya Kumar, Vedant Kumar
Reviewers: Teresa Johnson, Aditya Kumar, Fedor Sergeev, Philip Pfaffe, Vedant Kumar
More information about the All-commits
mailing list