[all-commits] [llvm/llvm-project] 50b2a1: Move "auto-init" instructions to the dominator of ...
serge-sans-paille via All-commits
all-commits at lists.llvm.org
Mon Apr 3 22:30:26 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 50b2a113db197a97f60ad2aace8b7382dc9b8c31
https://github.com/llvm/llvm-project/commit/50b2a113db197a97f60ad2aace8b7382dc9b8c31
Author: serge-sans-paille <sguelton at mozilla.com>
Date: 2023-04-04 (Tue, 04 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.
This is a recommit of cca01008cc31a891d0ec70aff2201b25d05d8f1b with
MemorySSA update fixes.
Differential Revision: https://reviews.llvm.org/D137707
More information about the All-commits
mailing list