[all-commits] [llvm/llvm-project] 966056: [llvm-reduce] Add reduction passes to reduce opera...

aeubanks via All-commits all-commits at lists.llvm.org
Tue Oct 19 15:25:38 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 9660563950aaed54020bfdf0be07e7096a9553e4
      https://github.com/llvm/llvm-project/commit/9660563950aaed54020bfdf0be07e7096a9553e4
  Author: Arthur Eubanks <aeubanks at google.com>
  Date:   2021-10-19 (Tue, 19 Oct 2021)

  Changed paths:
    M llvm/test/tools/llvm-reduce/remove-invoked-functions.ll
    M llvm/test/tools/llvm-reduce/remove-operands.ll
    M llvm/tools/llvm-reduce/DeltaManager.cpp
    M llvm/tools/llvm-reduce/deltas/ReduceOperands.cpp
    M llvm/tools/llvm-reduce/deltas/ReduceOperands.h

  Log Message:
  -----------
  [llvm-reduce] Add reduction passes to reduce operands to undef/1/0

Having non-undef constants in a final llvm-reduce output is nicer than
having undefs.

This splits the existing reduce-operands pass into three, one which does
the same as the current pass of reducing to undef, and two more to
reduce to the constant 1 and the constant 0. Do not reduce to undef if
the operand is a ConstantData, and do not reduce 0s to 1s.

Reducing GEP operands very frequently causes invalid IR (since types may
not match up if we index differently into a struct), so don't touch GEPs.

Reviewed By: Meinersbur

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




More information about the All-commits mailing list