llvm-project/llvm/test/Transforms/ArgumentPromotion
Pavel Samolysov 170c4d21bd [ArgPromotion] Unify byval promotion with non-byval
It makes sense to handle byval promotion in the same way as non-byval
but also allowing `store` instructions. However, these should
use the same checks as the `load` instructions do, i.e. be part of the
`ArgsToPromote` collection. For these instructions, the check for
interfering modifications can be disabled, though. The promotion
algorithm itself has been modified a lot: all the accesses (i.e. loads
and stores) are rewritten to the emitted `alloca` instructions. To
optimize these new `alloca`s out, the `PromoteMemToReg` function from
`Transforms/Utils/PromoteMemoryToRegister.cpp` file is invoked after
promotion.

In order to let the `PromoteMemToReg` promote as many `alloca`s as it
is possible, there should be no `GEP`s from the `alloca`s. To
eliminate the `GEP`s, its own `alloca` is generated for every argument
part because a single `alloca` for the whole argument (that
significantly simplifies the code of the pass though) unfortunately
cannot be used.

The idea comes from the following discussion:
https://reviews.llvm.org/D124514#3479676

Differential Revision: https://reviews.llvm.org/D125485
2022-06-28 15:19:58 +03:00
..
X86 [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
2008-02-01-ReturnAttrs.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
2008-07-02-array-indexing.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
2008-09-07-CGUpdate.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
2008-09-08-CGUpdateSelfEdge.ll
aggregate-promote-dead-gep.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
aggregate-promote.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
align.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
attrs.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
basictest.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
bitcasts.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
byval-2.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
byval-with-padding.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
byval.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
chained.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
control-flow.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
control-flow2.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
crash.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
dbg.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
dead-gep-no-promotion.ll [ArgPromotion] Regenerate test checks for dead-gep-no-promotion.ll 2022-02-20 15:00:18 +03:00
fp80.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
inalloca.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
invalidation.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
load-after-non-willreturn-call.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
max-elements-limit.ll [ArgPromotion] Change the condition to check the promotion limit 2022-04-28 09:42:58 -07:00
metadata.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
min-legal-vector-width.ll [ArgPromotion][Attributor] Update min-legal-vector-width when do promotion 2022-05-02 14:13:05 +08:00
musttail.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
naked_functions.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
nonzero-address-spaces.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
opaque-ptr.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
pr27568.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
pr32917.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
pr33641_remove_arg_dbgvalue.ll
pr42028-recursion.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
profile.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00
reserve-tbaa.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
sret.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
store-after-load.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
store-into-inself.ll [ArgPromotion] Unify byval promotion with non-byval 2022-06-28 15:19:58 +03:00
unused-argument.ll [ArgPromotion] Add unused-argument.ll test (NFC) 2022-05-18 10:05:13 +03:00
variadic.ll [ArgPromotion] auto-update test checks. 2022-02-20 13:23:12 +03:00
volatile-atomic.ll [ArgPromotion] Remove legacy PM support 2022-06-27 09:42:17 +02:00