[PATCH] D131505: [llvm-reduce] Try harder to not create invalid aliases
Arthur Eubanks via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 9 09:18:06 PDT 2022
aeubanks created this revision.
aeubanks added reviewers: regehr, arsenm.
Herald added a subscriber: jeroen.dobbelaere.
Herald added a project: All.
aeubanks requested review of this revision.
Herald added subscribers: llvm-commits, wdng.
Herald added a project: LLVM.
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.
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D131505
Files:
llvm/test/tools/llvm-reduce/remove-bbs-comdat.ll
llvm/test/tools/llvm-reduce/remove-bbs-entry.ll
llvm/test/tools/llvm-reduce/remove-function-bodies-used-in-globals.ll
llvm/test/tools/llvm-reduce/temporary-files-as-bitcode-split.ll
llvm/test/tools/llvm-reduce/temporary-files-as-bitcode.ll
llvm/tools/llvm-reduce/deltas/Delta.cpp
llvm/tools/llvm-reduce/deltas/ReduceBasicBlocks.cpp
llvm/tools/llvm-reduce/deltas/ReduceFunctionBodies.cpp
llvm/tools/llvm-reduce/deltas/ReduceFunctions.cpp
llvm/tools/llvm-reduce/deltas/Utils.cpp
llvm/tools/llvm-reduce/deltas/Utils.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131505.451183.patch
Type: text/x-patch
Size: 10245 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220809/1fc1654c/attachment.bin>
More information about the llvm-commits
mailing list