[all-commits] [llvm/llvm-project] 0f9d9e: llvm-reduce: Add reduction for custom register masks

Matt Arsenault via All-commits all-commits at lists.llvm.org
Mon Jul 18 10:41:20 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f9d9edd24774678491c19aa8653d8ac6c44da97
      https://github.com/llvm/llvm-project/commit/0f9d9edd24774678491c19aa8653d8ac6c44da97
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    A llvm/test/tools/llvm-reduce/mir/reduce-register-masks.mir
    M llvm/tools/llvm-reduce/CMakeLists.txt
    M llvm/tools/llvm-reduce/DeltaManager.cpp
    M llvm/tools/llvm-reduce/ReducerWorkItem.cpp
    A llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.cpp
    A llvm/tools/llvm-reduce/deltas/ReduceRegisterMasks.h

  Log Message:
  -----------
  llvm-reduce: Add reduction for custom register masks

I have a register allocator failure that only reproduces with IPRA
enabled, and requires the specific regmask if I want to only run the
one relevant pass. The printed custom regmask is enormous and I would
like to reduce it.

This reduces each individual bit in the mask, but it would probably be
better to start at register units and clear all aliasing fields at a
time. This would require stricter verification that all aliasing bits
are set in regmasks (although I would prefer to switch regmasks to use
register units in the first place).


  Commit: e24b390dbc4eb052241103265496ba34c8305723
      https://github.com/llvm/llvm-project/commit/e24b390dbc4eb052241103265496ba34c8305723
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-07-18 (Mon, 18 Jul 2022)

  Changed paths:
    M llvm/test/tools/llvm-reduce/mir/generic-vreg.mir
    A llvm/test/tools/llvm-reduce/mir/reduce-register-defs.mir
    M llvm/tools/llvm-reduce/CMakeLists.txt
    M llvm/tools/llvm-reduce/DeltaManager.cpp
    A llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.cpp
    A llvm/tools/llvm-reduce/deltas/ReduceRegisterDefs.h

  Log Message:
  -----------
  llvm-reduce: Add reduction for instruction defs

Try to insert an implicit_def to replace the instruction's value,
replacing the original instruction's def with a dead register. If all
defs are delete the instruction entirely.

This is pretty similar to the instruction reduction, but leaves the
new defs in the same place as the original instruction. This could
possibly replace it. I'm not sure if we should directly delete the
instructions here, or leave dead ones behind.

This could also further work to replace physical register defs.


Compare: https://github.com/llvm/llvm-project/compare/86c4242976f7...e24b390dbc4e


More information about the All-commits mailing list