Unconditionally removing landing pads results in invalid IR,
if there is a different invoke that uses it. Update the code
to only remove the landing pad if the current invoke is the only
user. Also carefully avoid creating plain branches to bbs with
landing pads we couldn't remove.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Comment Actions
If it's temporarily invalid as in will fall the verifier, probably should try to avoid getting there in the first place
llvm/test/tools/llvm-reduce/invoke-with-missing-landingpad.ll | ||
---|---|---|
2 | Should add -abort-on-invalid-reduction |
Comment Actions
Fair point! I updated the code to only remove the landing pad instruction if the current invoke is the only invoke using it. This also requires extra care when we cannot remove the landing pad and it would be the destination for the branch.
llvm/test/tools/llvm-reduce/invoke-with-missing-landingpad.ll | ||
---|---|---|
2 | Done, thanks! |
llvm/test/tools/llvm-reduce/invoke-with-missing-landingpad.ll | ||
---|---|---|
2 | looks like this wasn't done |
llvm/test/tools/llvm-reduce/invoke-with-missing-landingpad.ll | ||
---|---|---|
2 | Missed to include this in the recent update, fixed in the committed version. |
Should add -abort-on-invalid-reduction