diff options
author | Arthur Eubanks <aeubanks@google.com> | 2021-09-24 15:54:17 -0700 |
---|---|---|
committer | Arthur Eubanks <aeubanks@google.com> | 2021-10-06 11:03:51 -0700 |
commit | 8d64314ffea55f2ad94c1b489586daa8ce30f451 (patch) | |
tree | ab949f45a1698f6f509596d8e1d2550eed92ed56 /compiler-rt/test/lit.common.configured.in | |
parent | 05de0ab431ec70abdd035eb80244f8788a115259 (diff) | |
download | llvm-8d64314ffea55f2ad94c1b489586daa8ce30f451.tar.gz |
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
Diffstat (limited to 'compiler-rt/test/lit.common.configured.in')
0 files changed, 0 insertions, 0 deletions