[all-commits] [llvm/llvm-project] a6d973: Revert "Move "auto-init" instructions to the domin...
Hans via All-commits
all-commits at lists.llvm.org
Wed Apr 12 04:37:51 PDT 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a6d9730f403afa8b591f278101996ecca9ad2dd2
https://github.com/llvm/llvm-project/commit/a6d9730f403afa8b591f278101996ecca9ad2dd2
Author: Hans Wennborg <hans at chromium.org>
Date: 2023-04-12 (Wed, 12 Apr 2023)
Changed paths:
R 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
R 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
R llvm/test/Transforms/MoveAutoInit/branch.ll
R llvm/test/Transforms/MoveAutoInit/clobber.ll
R llvm/test/Transforms/MoveAutoInit/fence.ll
R llvm/test/Transforms/MoveAutoInit/loop.ll
R llvm/test/Transforms/MoveAutoInit/scalar.ll
Log Message:
-----------
Revert "Move "auto-init" instructions to the dominator of their users"
This could also move initialization of sret args, causing actually
initialized parts of such return values to be uninitialized. See
discussion on the code review.
> 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
This reverts commit 50b2a113db197a97f60ad2aace8b7382dc9b8c31
and follow-up commit ad9ad3735c4821ff4651fab7537a75b8f0bb60f8.
More information about the All-commits
mailing list