llvm-project/llvm/test/Transforms/Attributor/IPConstantProp
Arthur Eubanks 05392466f0 Reland [IR] Increase max alignment to 4GB
Currently the max alignment representable is 1GB, see D108661.
Setting the align of an object to 4GB is desirable in some cases to make sure the lower 32 bits are clear which can be used for some optimizations, e.g. https://crbug.com/1016945.

This uses an extra bit in instructions that carry an alignment. We can store 15 bits of "free" information, and with this change some instructions (e.g. AtomicCmpXchgInst) use 14 bits.
We can increase the max alignment representable above 4GB (up to 2^62) since we're only using 33 of the 64 values, but I've just limited it to 4GB for now.

The one place we have to update the bitcode format is for the alloca instruction. It stores its alignment into 5 bits of a 32 bit bitfield. I've added another field which is 8 bits and should be future proof for a while. For backward compatibility, we check if the old field has a value and use that, otherwise use the new field.

Updating clang's max allowed alignment will come in a future patch.

Reviewed By: hans

Differential Revision: https://reviews.llvm.org/D110451
2021-10-06 13:29:23 -07:00
..
2008-06-09-WeakProp.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
2009-09-24-byval-ptr.ll [Attributor][FIX] Do not treat byval args as local memory (for now) 2021-08-27 13:12:11 -05:00
PR16052.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
PR26044.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
PR43857.ll [Attributor][FIX] Account for undef in the constant value lattice 2021-05-23 20:47:06 -05:00
arg-count-mismatch.ll [IR] Look through bitcast in hasFnAttribute() 2021-09-21 21:57:02 +02:00
arg-type-mismatch.ll [IR] Look through bitcast in hasFnAttribute() 2021-09-21 21:57:02 +02:00
comdat-ipo.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
dangling-block-address.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
deadarg.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
fp-bc-icmp-const-fold.ll [Attributor] Teach AAIsDead about undef values 2021-05-23 23:00:40 -05:00
global.ll [Attributor] Introduce AAPointerInfo 2021-07-19 22:48:35 -05:00
multiple_callbacks.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
musttail-call.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
naked-return.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
openmp_parallel_for.ll [Attributor] Extend the AAValueSimplify compare simplification logic 2021-07-20 00:35:14 -05:00
pthreads.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
recursion.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
remove-call-inst.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
return-argument.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
return-constant.ll [Attributor] Use a centralized value simplification interface 2021-06-18 01:07:53 -05:00
return-constants.ll [Attributor] Use a centralized value simplification interface 2021-06-18 01:07:53 -05:00
solve-after-each-resolving-undefs-for-function.ll [Attributor] Teach AAIsDead about undef values 2021-05-23 23:00:40 -05:00
thread_local_acs.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00