[all-commits] [llvm/llvm-project] ba7c79: [llvm-reduce] Skip chunks that lead to broken modu...

Florian Hahn via All-commits all-commits at lists.llvm.org
Fri Aug 28 01:13:39 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: ba7c79cb3a69dd6ec2256afa9913214e63aea0d7
      https://github.com/llvm/llvm-project/commit/ba7c79cb3a69dd6ec2256afa9913214e63aea0d7
  Author: Florian Hahn <flo at fhahn.com>
  Date:   2020-08-28 (Fri, 28 Aug 2020)

  Changed paths:
    M llvm/test/Reduce/remove-function-bodies-used-in-globals.ll
    M llvm/tools/llvm-reduce/deltas/Delta.cpp

  Log Message:
  -----------
  [llvm-reduce] Skip chunks that lead to broken modules.

Some reduction passes may create invalid IR. I am not aware of any use
case where we would like to proceed reducing invalid IR. Various utils
used here, including CloneModule, assume the module to clone is valid
and crash otherwise.

Ideally, no reduction pass would create invalid IR, but some currently
do. ReduceInstructions can be fixed relatively easily (D86210), but
others are harder. For example, ReduceBasicBlocks may remove result in
invalid PHI nodes.

For now, skip the chunks. If we get to the point where all reduction
passes result in valid IR, we may want to turn this into an assertion.

Reviewed By: lebedev.ri

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




More information about the All-commits mailing list