[all-commits] [llvm/llvm-project] d5e14b: [GlobalISel] NFC: Change LLT::vector to take Eleme...

sdesmalen-arm via All-commits all-commits at lists.llvm.org
Thu Jun 24 03:27:55 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d5e14ba88cbf353236faa45caf626c2a30a1cb0c
      https://github.com/llvm/llvm-project/commit/d5e14ba88cbf353236faa45caf626c2a30a1cb0c
  Author: Sander de Smalen <sander.desmalen at arm.com>
  Date:   2021-06-24 (Thu, 24 Jun 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizerInfo.h
    M llvm/include/llvm/Support/LowLevelTypeImpl.h
    M llvm/lib/CodeGen/GlobalISel/CallLowering.cpp
    M llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp
    M llvm/lib/CodeGen/GlobalISel/LegacyLegalizerInfo.cpp
    M llvm/lib/CodeGen/GlobalISel/LegalizeMutations.cpp
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/lib/CodeGen/GlobalISel/Utils.cpp
    M llvm/lib/CodeGen/LowLevelType.cpp
    M llvm/lib/CodeGen/MIRParser/MIParser.cpp
    M llvm/lib/Target/AArch64/AArch64ISelLowering.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64InstructionSelector.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp
    M llvm/lib/Target/AArch64/GISel/AArch64PostLegalizerLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUArgumentUsageInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUCallLowering.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUInstructionSelector.cpp
    M llvm/lib/Target/AMDGPU/AMDGPULegalizerInfo.cpp
    M llvm/lib/Target/AMDGPU/AMDGPUPreLegalizerCombiner.cpp
    M llvm/lib/Target/AMDGPU/AMDGPURegisterBankInfo.cpp
    M llvm/lib/Target/Mips/MipsLegalizerInfo.cpp
    M llvm/lib/Target/X86/X86LegalizerInfo.cpp
    M llvm/unittests/CodeGen/GlobalISel/CSETest.cpp
    M llvm/unittests/CodeGen/GlobalISel/GISelUtilsTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/KnownBitsVectorTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/LegalizerHelperTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/LegalizerInfoTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/LegalizerTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/MachineIRBuilderTest.cpp
    M llvm/unittests/CodeGen/GlobalISel/PatternMatchTest.cpp
    M llvm/unittests/CodeGen/LowLevelTypeTest.cpp
    M llvm/utils/TableGen/GlobalISelEmitter.cpp

  Log Message:
  -----------
  [GlobalISel] NFC: Change LLT::vector to take ElementCount.

This also adds new interfaces for the fixed- and scalable case:
* LLT::fixed_vector
* LLT::scalable_vector

The strategy for migrating to the new interfaces was as follows:
* If the new LLT is a (modified) clone of another LLT, taking the
  same number of elements, then use LLT::vector(OtherTy.getElementCount())
  or if the number of elements is halfed/doubled, it uses .divideCoefficientBy(2)
  or operator*. That is because there is no reason to specifically restrict
  the types to 'fixed_vector'.
* If the algorithm works on the number of elements (as unsigned), then
  just use fixed_vector. This will need to be fixed up in the future when
  modifying the algorithm to also work for scalable vectors, and will need
  then need additional tests to confirm the behaviour works the same for
  scalable vectors.
* If the test used the '/*Scalable=*/true` flag of LLT::vector, then
  this is replaced by LLT::scalable_vector.

Reviewed By: aemerson

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




More information about the All-commits mailing list