llvm-project/llvm/test/Transforms/SROA
Cullen Rhodes 84aa6cf1a9 [Transforms][SROA] Promote allocas with mem2reg for scalable types
Summary:
Aggregate types containing scalable vectors aren't supported and as far
as I can tell this pass is mostly concerned with optimisations on
aggregate types, so the majority of this pass isn't very useful for
scalable vectors.

This patch modifies SROA such that mem2reg is run on allocas with
scalable types that are promotable, but nothing else such as slicing is
done.

The use of TypeSize in this pass has also been updated to be explicitly
fixed size. When invoking the following methods in DataLayout:

    * getTypeSizeInBits
    * getTypeStoreSize
    * getTypeStoreSizeInBits
    * getTypeAllocSize

we now called getFixedSize on the resultant TypeSize. This is quite an
extensive change with around 50 calls to these functions, and also the
first change of this kind (being explicit about fixed vs scalable
size) as far as I'm aware, so feedback welcome.

A test is included containing IR with scalable vectors that this pass is
able to optimise.

Reviewed By: efriedma

Differential Revision: https://reviews.llvm.org/D76720
2020-04-01 10:34:11 +00:00
..
address-spaces.ll
addrspacecast.ll
alignment.ll SROA: Don't drop atomic load/store alignments (PR45010) 2020-02-28 10:38:40 +01:00
alloca-address-space.ll
basictest.ll
big-endian.ll
dbg-addr-diamond.ll
dbg-single-piece.ll
dead-inst.ll
fca.ll
mem-par-metadata-sroa.ll Migrate function attribute "no-frame-pointer-elim" to "frame-pointer"="all" as cleanups after D56351 2019-12-24 15:57:33 -08:00
non-integral-pointers.ll
phi-and-select.ll
phi-with-duplicate-pred.ll
pointer-offset-size.ll
ppcf128-no-fold.ll
pr26972.ll
pr37267.ll
preserve-nonnull.ll
scalable-vectors.ll [Transforms][SROA] Promote allocas with mem2reg for scalable types 2020-04-01 10:34:11 +00:00
slice-order-independence.ll
slice-width.ll
tbaa-struct.ll [Metadata] Add TBAA struct metadata to `AAMDNode` 2020-01-06 11:05:15 +03:00
vector-conversion.ll
vector-lifetime-intrinsic.ll
vector-promotion-different-size.ll
vector-promotion.ll
vectors-of-pointers.ll