Commit Graph

4 Commits

Author SHA1 Message Date
Matt Arsenault 8e3e218a5f llvm-reduce: Fix producing invalid reductions on ifunc 2022-11-27 12:41:29 -05:00
Arthur Eubanks 309d453866 [llvm-reduce] Move most debugging output behind --verbose
This should cut down on the visual noise when reducing. Still keep output when we run a pass or when we successfully reduce.

Notably, this also suppresses redirecting the test output to stdout/stderr.

Reviewed By: regehr

Differential Revision: https://reviews.llvm.org/D131922
2022-08-19 13:25:42 -07:00
Arthur Eubanks 195087d815 [llvm-reduce] Try harder to not create invalid aliases
This was done by adding --abort-on-invalid-reduction to remove-function-bodies-used-in-globals.ll and fixing the fallout.

Aliases must have a GlobalValue or ConstantExpr aliasee and the aliasee must be a definition if it's a GlobalValue.
Don't RAUW functions with null if there's an alias pointing to it, and similarly don't delete the body of a function.
Don't delete the entire body of a function when reducing blocks, preserve at least one block.

Also make debugging these sorts of things easier by dumping the module when --abort-on-invalid-reduction triggers.

Reviewed By: regehr

Differential Revision: https://reviews.llvm.org/D131505
2022-08-12 10:39:05 -07:00
John Regehr 2962f9df7c stop llvm-reduce from introducing undefs
Differential Revision: https://reviews.llvm.org/D128317
2022-06-22 20:41:23 -06:00