[all-commits] [llvm/llvm-project] 1577c4: [GlobalISel] Allow the ArtifactValueFinder to retu...

Amara Emerson via All-commits all-commits at lists.llvm.org
Thu Aug 5 17:37:45 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 1577c41090a0606432688a9a9cd1744cddcccbda
      https://github.com/llvm/llvm-project/commit/1577c41090a0606432688a9a9cd1744cddcccbda
  Author: Amara Emerson <amara at apple.com>
  Date:   2021-08-05 (Thu, 05 Aug 2021)

  Changed paths:
    M llvm/include/llvm/CodeGen/GlobalISel/LegalizationArtifactCombiner.h
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-inserts.mir
    M llvm/test/CodeGen/AMDGPU/GlobalISel/bug-legalization-artifact-combiner-dead-def.mir

  Log Message:
  -----------
  [GlobalISel] Allow the ArtifactValueFinder to return the best available register on failure.

In some cases, like with inserts, we may have a matching size register already,
but still decide to try to look further. This change adds a CurrentBest
register to the value finder state, and any time a method fails to make progress,
returns that register (which may just be an empty Register).

To facilitate this, add a new entry point to the findValueFromDef() function
which initializes this state.

Also fix the build vector finder to return the current build_vector if all
sources are being requested.

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




More information about the All-commits mailing list