[all-commits] [llvm/llvm-project] b1c304: [CodeGen] Try to make the print of memory operand ...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Jan 11 20:13:49 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: b1c304c4946506c0d00532829fb2f91276dde0c8
      https://github.com/llvm/llvm-project/commit/b1c304c4946506c0d00532829fb2f91276dde0c8
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-01-11 (Mon, 11 Jan 2021)

  Changed paths:
    M llvm/lib/CodeGen/MIRParser/MILexer.cpp
    M llvm/lib/CodeGen/MIRParser/MILexer.h
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/CodeGen/MachineOperand.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/inline-memcpy.mir
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-non-pow2-load-store.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-extract-vector-elt.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/legalize-insert-vector-elt.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-amdgcn.s.buffer.load.ll
    M llvm/test/CodeGen/AMDGPU/GlobalISel/regbankselect-load.mir
    M llvm/test/CodeGen/MIR/X86/expected-align-in-memory-operand.mir
    M llvm/test/CodeGen/MIR/X86/expected-alignment-after-align-in-memory-operand.mir
    M llvm/test/CodeGen/MIR/X86/expected-positive-alignment-after-align.mir
    M llvm/test/CodeGen/MIR/X86/memory-operands.mir
    M llvm/test/CodeGen/Mips/GlobalISel/legalizer/store_split_because_of_memsize_or_align.mir
    M llvm/test/CodeGen/Mips/GlobalISel/regbankselect/load.mir
    M llvm/test/CodeGen/Mips/GlobalISel/regbankselect/long_ambiguous_chain_s32.mir
    M llvm/test/CodeGen/Mips/GlobalISel/regbankselect/long_ambiguous_chain_s64.mir
    M llvm/test/CodeGen/Mips/GlobalISel/regbankselect/store.mir
    M llvm/test/CodeGen/PowerPC/aix-cc-abi.ll
    M llvm/test/CodeGen/X86/avoid-sfb-offset.mir
    M llvm/test/CodeGen/X86/bug47278.mir

  Log Message:
  -----------
  [CodeGen] Try to make the print of memory operand alignment a little more user friendly.

Memory operands store a base alignment that does not factor in
the effect of the offset on the alignment.

Previously the printing code only printed the base alignment if
it was different than the size. If there is an offset, the reader
would need to figure out the effective alignment themselves. This
has confused me before and someone else was recently confused on
IRC.

This patch prints the possibly offset adjusted alignment if it is
different than the size. And prints the base alignment if it is
different than the alignment. The MIR parser has been updated to
read basealign in addition to align.

Reviewed By: arsenm

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




More information about the All-commits mailing list