[PATCH] D83119: [Alignment][NFC] Use 5 bits to store Instructions Alignment
Guillaume Chatelet via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 3 02:07:45 PDT 2020
gchatelet marked 3 inline comments as done.
gchatelet added inline comments.
================
Comment at: llvm/include/llvm/IR/Instruction.h:59
+ // Template alias so that all Instruction storing alignment use the same
+ // definiton.
+ template <unsigned Offset>
----------------
courbet wrote:
> Add comment: `// Align(1) is stored as 0. Valid alignments are powers of two from 2^0 to 2^MaxAlignmentExponent = 2^29, so we need 5 bits to encode the 30 possible values.`
I've reworded it a bit. I hope you don't mind.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D83119/new/
https://reviews.llvm.org/D83119
More information about the llvm-commits
mailing list