[all-commits] [llvm/llvm-project] 0f831a: GlobalISel: s/Op/Instr in some places. NFC

Diana via All-commits all-commits at lists.llvm.org
Fri Jan 13 00:45:48 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f831aa805da1875aacdd205a4a0b0587e30df54
      https://github.com/llvm/llvm-project/commit/0f831aa805da1875aacdd205a4a0b0587e30df54
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/GenericMachineInstrs.h
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
    M llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp

  Log Message:
  -----------
  GlobalISel: s/Op/Instr in some places. NFC

This patch replaces `GMergeLikeOp` with `GMergeLikeInstr` and
`MachineIRBuilder::buildAssertOp` with `buildAssertInstr` in order to
remove ambiguity. Discussed in: https://reviews.llvm.org/D141372


  Commit: f95a5fbe7ce1ddc890868a2b4720b4561af672cf
      https://github.com/llvm/llvm-project/commit/f95a5fbe7ce1ddc890868a2b4720b4561af672cf
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
    M llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
    M llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
    M llvm/lib/CodeGen/GlobalISel/CombinerHelper.cpp
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64CallLowering.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/lib/Target/ARM/ARMCallLowering.cpp
    M llvm/lib/Target/Mips/MipsCallLowering.cpp
    M llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
    M llvm/lib/Target/X86/X86CallLowering.cpp
    M llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp

  Log Message:
  -----------
  MachineIRBuilder: Rename buildMerge. NFC

`buildMerge` may build a G_MERGE_VALUES, G_BUILD_VECTOR or
G_CONCAT_VECTORS. Rename it to `buildMergeLikeInstr`.

This is a follow-up suggested in https://reviews.llvm.org/D140964

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


  Commit: 2004ab422a01b24c183f958b10ec4845aeb9b453
      https://github.com/llvm/llvm-project/commit/2004ab422a01b24c183f958b10ec4845aeb9b453
  Author: Diana Picus <Diana-Magda.Picus at amd.com>
  Date:   2023-01-13 (Fri, 13 Jan 2023)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
    M llvm/include/llvm/CodeGen/GlobalISel/MachineIRBuilder.h
    M llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
    M llvm/lib/CodeGen/GlobalISel/MachineIRBuilder.cpp
    M llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp

  Log Message:
  -----------
  MachineIRBuilder: Add buildMergeValues. NFC

Add a `buildMergeValues` method that unconditionally builds a
G_MERGE_VALUES instruction, as opposed to `buildMergeLikeInstr` which
may decide on a different opcode based on the input types.

I haven't audited all the uses of `buildMergeLikeInstr` to see if they
can be replaced with `buildMergeValues`, but I did find a couple of
obvious ones where we check that we're merging scalars right before
calling `buildMerge`.

This is a follow-up suggested in https://reviews.llvm.org/D140964

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


Compare: https://github.com/llvm/llvm-project/compare/199e49746db8...2004ab422a01


More information about the All-commits mailing list