[all-commits] [llvm/llvm-project] 063258: [Alignment][NFC] Use 5 bits to store Instructions ...

Guillaume Chatelet via All-commits all-commits at lists.llvm.org
Fri Jul 3 01:54:50 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: 063258eb6e32d7c185023b81f10b34f9bddbd8b3
      https://github.com/llvm/llvm-project/commit/063258eb6e32d7c185023b81f10b34f9bddbd8b3
  Author: Guillaume Chatelet <gchatelet at google.com>
  Date:   2020-07-03 (Fri, 03 Jul 2020)

  Changed paths:
    M llvm/include/llvm/IR/Instruction.h
    M llvm/include/llvm/IR/Instructions.h
    M llvm/lib/IR/Instructions.cpp

  Log Message:
  -----------
  [Alignment][NFC] Use 5 bits to store Instructions Alignment

As per [MaxAlignmentExponent]{https://github.com/llvm/llvm-project/blob/b7338fb1a6a464472850211165391983d2c8fdf3/llvm/include/llvm/IR/Value.h#L688} alignment is not allowed to be more than 2^29.
Encoded as Log2, this means that storing alignment uses 5 bits.
This patch makes sure all instructions store their alignment in a consistent way, encoded as Log2 and using 5 bits.

Differential Revision: https://reviews.llvm.org/D83119




More information about the All-commits mailing list