[PATCH] D147694: [FunctionAttrs] Fix nounwind inference for landingpads
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 12 01:41:20 PDT 2023
nikic updated this revision to Diff 512689.
nikic added a comment.
Herald added a reviewer: sstefan1.
Herald added subscribers: okura, kuter.
Move logic to mayThrow() behind a flag. I tried doing this without the flag initially, but this does affect some optimizations.
I've opted to make the invoke throwing, rather than the landingpad itself. I think this more closely matches reality, in that it's not the landingpad that's going to throw, it's the invoke that will fail to catch the exception and continue unwinding.
Note that the logic for non-cleanup landingpads applies always, even without the flag. That part should be independent of phase one unwinding.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147694/new/
https://reviews.llvm.org/D147694
Files:
llvm/include/llvm/IR/Instruction.h
llvm/lib/IR/Instruction.cpp
llvm/lib/Transforms/IPO/AttributorAttributes.cpp
llvm/lib/Transforms/IPO/FunctionAttrs.cpp
llvm/test/Transforms/Attributor/nocapture-1.ll
llvm/test/Transforms/FunctionAttrs/nounwind.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D147694.512689.patch
Type: text/x-patch
Size: 32265 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230412/db9a570c/attachment.bin>
More information about the llvm-commits
mailing list