[Reduce] Argument reduction: shoe-horn new function into remaining uses of old function
authorRoman Lebedev <lebedev.ri@gmail.com>
Mon, 27 Jul 2020 12:36:07 +0000 (15:36 +0300)
committerRoman Lebedev <lebedev.ri@gmail.com>
Mon, 27 Jul 2020 12:39:03 +0000 (15:39 +0300)
commit61480db6019d01a7a97de6ec64991664bf9b4996
tree3d5d42c59acd770bed5f2a4b146b1799c7cba53d
parent1bac5101cdaabfbc755a6d28936962d11240f932
[Reduce] Argument reduction: shoe-horn new function into remaining uses of old function

Much like with function reduction, there may be remaining unhandled uses
of function, in particular in blockaddress. And in constants we can't
RAUW it with undef, because undef is not a function.
Instead, let's try to pretent that in the remaining cases, the new
signature didn't change, by bitcasting it.

A new (previously crashing) test case added.
llvm/test/Reduce/remove-function-arguments-of-funcs-used-in-blockaddress.ll [new file with mode: 0644]
llvm/test/Reduce/remove-invoked-functions.ll
llvm/tools/llvm-reduce/deltas/ReduceArguments.cpp