[PATCH] D110451: [IR] Increase max alignment to 4GB
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 30 11:06:41 PDT 2021
aeubanks created this revision.
Herald added subscribers: ormris, dexonsmith, okura, kuter, hiraditya.
aeubanks retitled this revision from "[IR] Increase max alignment to 4GiB" to "[IR] Increase max alignment to 4GB".
aeubanks edited the summary of this revision.
aeubanks added reviewers: hans, rnk, arsenm, lebedev.ri, efriedma, craig.topper.
aeubanks published this revision for review.
aeubanks added a comment.
Herald added subscribers: llvm-commits, wdng.
Herald added a reviewer: jdoerfert.
Herald added a reviewer: sstefan1.
Herald added a reviewer: baziotis.
Herald added a project: LLVM.
I'll update tests/clang if this is ok with people
I can also split out the uint64_t changes
Currently the max alignment representable is 1GB, see D108661 <https://reviews.llvm.org/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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D110451
Files:
llvm/include/llvm/IR/DataLayout.h
llvm/include/llvm/IR/GlobalObject.h
llvm/include/llvm/IR/Instruction.h
llvm/include/llvm/IR/Instructions.h
llvm/include/llvm/IR/Value.h
llvm/include/llvm/Transforms/IPO/Attributor.h
llvm/lib/AsmParser/LLParser.cpp
llvm/lib/CodeGen/SafeStack.cpp
llvm/lib/IR/DataLayout.cpp
llvm/lib/Transforms/Instrumentation/AddressSanitizer.cpp
llvm/lib/Transforms/Instrumentation/HWAddressSanitizer.cpp
llvm/lib/Transforms/Utils/Local.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D110451.374977.patch
Type: text/x-patch
Size: 10778 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210930/42e6d4e0/attachment.bin>
More information about the llvm-commits
mailing list