llvm-project/llvm/test/Transforms/PhaseOrdering
Nikita Popov b74c6d2c9d [InlineFunction] Disable emission of alignment assumptions by default
In D74183 clang started emitting alignment for sret parameters
unconditionally. This caused a 1.5% compile-time regression on
tramp3d-v4. The reason is that we now generate many instance of IR like

    %ptrint = ptrtoint %class.GuardLayers* %guards_m to i64
    %maskedptr = and i64 %ptrint, 3
    %maskcond = icmp eq i64 %maskedptr, 0
    tail call void @llvm.assume(i1 %maskcond)

to preserve the alignment information during inlining. Based on IR
analysis, these assumptions also regress optimization. The attached
phase ordering test case illustrates two issues: One are instruction
count based optimization heuristics, which are affected by the four
additional instructions of the assumption. The other is blocking of
SROA due to ptrtoint casts (PR45763).

We already encountered the same problem in Rust, where we (unlike
Clang) generally prefer to emit alignment information absolutely
everywhere it is available. We were only able to do this after
hardcoding -preserve-alignment-assumptions-during-inlining=false,
because we were seeing significant optimization and compile-time
regressions otherwise.

This patch disables -preserve-alignment-assumptions-during-inlining
by default, because we should not be punishing people for adding
more alignment annotations.

Once the assume bundle work shakes out and we can represent (and use)
alignment assumptions using assume bundles, it should be possible to
re-enable this with reduced overhead.

Differential Revision: https://reviews.llvm.org/D76886
2020-04-30 23:12:54 +02:00
..
X86 [VectorCombine] transform bitcasted shuffle to wider elements 2020-04-19 08:24:38 -04:00
2010-03-22-empty-baseclass.ll
PR6627.ll
basic.ll
bitfield-bittests.ll
gdce.ll
globalaa-retained.ll
inlining-alignment-assumptions.ll [InlineFunction] Disable emission of alignment assumptions by default 2020-04-30 23:12:54 +02:00
lifetime-sanitizer.ll Add PhaseOrdering/lifetime-sanitizer.ll tests 2019-08-27 00:18:28 +00:00
min-max-abs-cse.ll [EarlyCSE] avoid crashing when detecting min/max/abs patterns (PR41083) 2020-02-10 17:25:34 -05:00
minmax.ll [InstCombine] add tests for cmyk benchmark; NFC 2020-04-02 13:00:46 -04:00
reassociate-after-unroll.ll [InstComine] Forego of one-use check in `(X - (X & Y)) --> (X & ~Y)` if Y is a constant 2020-03-06 21:39:07 +03:00
rotate.ll
scev-custom-dl.ll Reland [DataLayout] Fix occurrences that size and range of pointers are assumed to be the same. 2019-12-13 14:30:21 +00:00
scev.ll
simplifycfg-options.ll Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there."" 2019-11-26 20:28:52 -08:00
two-shifts-by-sext.ll Revert "Revert "As a follow-up to my initial mail to llvm-dev here's a first pass at the O1 described there."" 2019-11-26 20:28:52 -08:00
unsigned-multiply-overflow-check.ll [InstSimplify] Drop leftover "division-by-zero guard" around `@llvm.umul.with.overflow` inverted overflow bit 2019-08-29 12:48:04 +00:00
vector-trunc.ll [InstCombine] convert bitcast-shuffle to vector trunc 2020-04-05 09:48:02 -04:00