[all-commits] [llvm/llvm-project] cca010: Move "auto-init" instructions to the dominator of ...
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Mon Apr 3 06:28:00 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: cca01008cc31a891d0ec70aff2201b25d05d8f1b
https://github.com/llvm/llvm-project/commit/cca01008cc31a891d0ec70aff2201b25d05d8f1b
Author: serge-sans-paille <sguelton at mozilla.com>
Date: 2023-04-03 (Mon, 03 Apr 2023)
Changed paths:
A llvm/include/llvm/Transforms/Utils/MoveAutoInit.h
M llvm/lib/Passes/PassBuilder.cpp
M llvm/lib/Passes/PassBuilderPipelines.cpp
M llvm/lib/Passes/PassRegistry.def
M llvm/lib/Transforms/Utils/CMakeLists.txt
A llvm/lib/Transforms/Utils/MoveAutoInit.cpp
M llvm/test/Other/new-pm-defaults.ll
M llvm/test/Other/new-pm-lto-defaults.ll
M llvm/test/Other/new-pm-thinlto-postlink-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/new-pm-thinlto-prelink-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-pgo-defaults.ll
M llvm/test/Other/new-pm-thinlto-prelink-samplepgo-defaults.ll
A llvm/test/Transforms/MoveAutoInit/branch.ll
A llvm/test/Transforms/MoveAutoInit/clobber.ll
A llvm/test/Transforms/MoveAutoInit/fence.ll
A llvm/test/Transforms/MoveAutoInit/loop.ll
A llvm/test/Transforms/MoveAutoInit/scalar.ll
Log Message:
-----------
Move "auto-init" instructions to the dominator of their users
As a result of -ftrivial-auto-var-init, clang generates instructions to
set alloca'd memory to a given pattern, right after the allocation site.
In some cases, this (somehow costly) operation could be delayed, leading
to conditional execution in some cases.
This is not an uncommon situation: it happens ~500 times on the cPython
code base, and much more on the LLVM codebase. The benefit greatly
varies on the execution path, but it should not regress on performance.
Differential Revision: https://reviews.llvm.org/D137707
More information about the All-commits
mailing list