[PATCH] D144437: llvm-reduce: Support running passes unconditionally and add useful manual reductions

Zoxc via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Feb 20 16:09:01 PST 2023


Zoxc created this revision.
Zoxc added a reviewer: arsenm.
Herald added a project: All.
Zoxc requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.

This adds a `--reduce` command line options which just runs the specified passes without using a test program or the delta algorithm.

A `noise` pass is added which runs other passes intended to make the LLVM IR more readable is added by removing less important details. It also runs a demangling pass.

A `to-call-list` pass is added which runs other passes reducing functions to only calls of non-intrinsic functions. It also removes arguments and runs the `noise` pass. This is useful to investigate inlining behavior.

The reduce arguments pass is changed to no longer delete instructions so that it can be reused in the `to-call-list` pass. I'm not sure why it previously did so, as there is a separate pass to remove instructions.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144437

Files:
  llvm/tools/llvm-reduce/CMakeLists.txt
  llvm/tools/llvm-reduce/DeltaManager.cpp
  llvm/tools/llvm-reduce/DeltaManager.h
  llvm/tools/llvm-reduce/TestRunner.cpp
  llvm/tools/llvm-reduce/TestRunner.h
  llvm/tools/llvm-reduce/deltas/Delta.cpp
  llvm/tools/llvm-reduce/deltas/Demangle.cpp
  llvm/tools/llvm-reduce/deltas/Demangle.h
  llvm/tools/llvm-reduce/deltas/MoveToEntry.cpp
  llvm/tools/llvm-reduce/deltas/MoveToEntry.h
  llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp
  llvm/tools/llvm-reduce/deltas/ReduceInstructions.cpp
  llvm/tools/llvm-reduce/deltas/ReduceInstructions.h
  llvm/tools/llvm-reduce/llvm-reduce.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144437.498973.patch
Type: text/x-patch
Size: 24648 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230221/2f4b7940/attachment-0001.bin>


More information about the llvm-commits mailing list