[all-commits] [llvm/llvm-project] 08d1c4: llvm-reduce: Add conditional reduction passes

Matt Arsenault via All-commits all-commits at lists.llvm.org
Sun Oct 23 15:44:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 08d1c43c7023a2e955c43fbf4c3f1635f91521e0
      https://github.com/llvm/llvm-project/commit/08d1c43c7023a2e955c43fbf4c3f1635f91521e0
  Author: Matt Arsenault <Matthew.Arsenault at amd.com>
  Date:   2022-10-23 (Sun, 23 Oct 2022)

  Changed paths:
    A llvm/test/tools/llvm-reduce/reduce-conditionals.ll
    M llvm/tools/llvm-reduce/DeltaManager.cpp
    M llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.cpp
    M llvm/tools/llvm-reduce/deltas/ReduceUsingSimplifyCFG.h

  Log Message:
  -----------
  llvm-reduce: Add conditional reduction passes

Copy this technique from bugpoint. Before trying to blindly
delete blocks, try to fold branch conditions. This intuitively
makes more sense for a faster reduction, since you can find
dead paths in the function to prune out before trying to bisect
blocks in source order.

Seems to provide some speedup on my multi-hour reduction samples.

This does have the potential to produce testcases with unreachable
blocks. This is already a problem with the existing block
reduction pass. I'm struggling dealing with invalid reductions
in these cases, so in the future this should probably start
deleting those. However, I do sometimes try to reduce failures
in code that becomes unreachable, so I'm not totally sure
what to do here.




More information about the All-commits mailing list