[all-commits] [llvm/llvm-project] 16c3db: [llvm-reduce] Fix invalid reduction in basic-block...

Dwight Guth via All-commits all-commits at lists.llvm.org
Tue Nov 9 10:45:33 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 16c3db8def87529f1392f26c17cb014108968bb4
      https://github.com/llvm/llvm-project/commit/16c3db8def87529f1392f26c17cb014108968bb4
  Author: Dwight Guth <dwight.guth at runtimeverification.com>
  Date:   2021-11-09 (Tue, 09 Nov 2021)

  Changed paths:
    A llvm/test/tools/llvm-reduce/remove-bbs-comdat.ll
    A llvm/test/tools/llvm-reduce/remove-bbs-entry.ll
    M llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp

  Log Message:
  -----------
  [llvm-reduce] Fix invalid reduction in basic-blocks delta pass

Previously, if the basic-blocks delta pass tried to remove a basic block
that was the last basic block in a function that did not have external
or weak linkage, the resulting IR would become invalid. Since removing
the last basic block in a function is effectively identical to removing
the function body itself, we check explicitly for this case and if we
detect it, we run the same logic as in ReduceFunctionBodies.cpp

Reviewed By: aeubanks

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




More information about the All-commits mailing list