[all-commits] [llvm/llvm-project] d4c3f2: [Reduce] Rewrite function body delta pass again

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sat Aug 8 13:49:30 PDT 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: d4c3f20285aded64e31a4faf6a5a9280352ff6af
      https://github.com/llvm/llvm-project/commit/d4c3f20285aded64e31a4faf6a5a9280352ff6af
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2020-08-08 (Sat, 08 Aug 2020)

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

  Log Message:
  -----------
  [Reduce] Rewrite function body delta pass again

It is not enough to replace all uses of users of the function with undef,
the users, we only drop instruction users, so they may stick around.

Let's try different approach - first drop bodies for all the functions
we will drop, which should take care of blockaddress issue the previous
rewrite was dealing with; then, after dropping *all* such bodies,
replace remaining uses with undef (thus all the uses are either
outside of functions, or are in kept functions)
and then finally drop functions.

This seems to work, and passes the *existing* test coverage,
but it is possible that a new issue will be discovered later :)

A new (previously crashing) test added.




More information about the All-commits mailing list