llvm-project/llvm/test/Transforms/Attributor
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
..
ArgumentPromotion Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
IPConstantProp Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
reduced Revert "[NFC] remove explicit default value for strboolattr attribute in tests" 2021-05-24 19:43:40 +02:00
align.ll [Attributor] Extend the AAValueSimplify compare simplification logic 2021-07-20 00:35:14 -05:00
allow_list.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
alwaysinline.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
callbacks.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
callgraph.ll Attributor: Fix crash on undef in !callees 2021-09-14 19:49:34 -04:00
cb_liveness_disabled.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
cb_liveness_enabled.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
cb_range_disabled.ll [Attributor] Derive `willreturn` based on `mustprogress` 2021-03-11 23:31:44 -06:00
cb_range_enabled.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
cgscc_bugs.ll [Attributor] Extend the AAValueSimplify compare simplification logic 2021-07-20 00:35:14 -05:00
chain.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
depgraph.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
dereferenceable-1.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
dereferenceable-2-inseltpoison.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
dereferenceable-2.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
heap_to_stack.ll [Attributor] Use checkForAllUses instead of custom use tracking 2021-07-20 01:39:33 -05:00
heap_to_stack_gpu.ll [Attributor] Extend the AAValueSimplify compare simplification logic 2021-07-20 00:35:14 -05:00
internal-noalias.ll [Attributor][FIX] Copy all members in the assignment operator 2021-07-27 01:44:13 -05:00
internalize.ll [opt] Remove some legacy PM flags 2021-09-13 15:50:03 -07:00
lit.local.cfg
liveness.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
liveness_chains.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
lowerheap.ll [IR] Memory intrinsics are not unconditionally `nosync` 2021-05-21 03:40:59 +02:00
lvi-after-jumpthreading.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
lvi-for-ashr.ll [Attributor] Look through selects in genericValueTraversal 2021-07-10 16:44:05 -05:00
memory_locations.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
misc.ll [OpaquePtr] Support forward references in textual IR 2021-06-29 20:10:31 +02:00
misc_crash.ll [Attributor][FIX] Do not try to rewrite functions with casted call sites 2021-08-12 10:39:53 -05:00
new_attributes.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
noalias.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
nocapture-1.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
nocapture-2.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
nodelete.ll [Attributor][FIX] Copy all members in the assignment operator 2021-07-27 01:44:13 -05:00
nofree.ll [Attributor] Set floating point loads and stores as nofree in AANoFreeFloating 2021-06-09 16:16:37 -04:00
nonnull.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
norecurse.ll [Attributor] Introduce AAPointerInfo 2021-07-19 22:48:35 -05:00
noreturn.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
noreturn_async.ll [Attributor] Introduce a helper do deal with constant type mismatches 2021-05-23 23:00:40 -05:00
noreturn_sync.ll [Attributor] Introduce AAPointerInfo 2021-07-19 22:48:35 -05:00
nosync.ll [IR] Memory intrinsics are not unconditionally `nosync` 2021-05-21 03:40:59 +02:00
noundef.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
nounwind.ll [Attributor][NFC] Update tests after D94741 2021-03-11 23:31:39 -06:00
potential.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
range.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
read_write_returned_arguments_scc.ll [Attributor] Extend the AAValueSimplify compare simplification logic 2021-07-20 00:35:14 -05:00
readattrs.ll [Attributor][FIX] Do not treat byval args as local memory (for now) 2021-08-27 13:12:11 -05:00
returned.ll [Attributor] Use AAValueSimplify to simplify returned values 2021-07-10 15:52:36 -05:00
undefined_behavior.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
value-simplify-instances.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
value-simplify-pointer-info.ll [Attributor][FIX] Recursion via memory needs to be tracked explicitly 2021-08-27 13:12:13 -05:00
value-simplify.ll Reland [IR] Increase max alignment to 4GB 2021-10-06 13:29:23 -07:00
willreturn.ll [Attributor] Utilize the InstSimplify interface to simplify instructions 2021-07-27 00:56:23 -05:00
wrapper.ll [Attributor] Delete dead stores 2021-07-26 23:33:36 -05:00