[PATCH] D141916: WIP: Unwindabort: add support for IR transforms and analysis.
Jon Roelofs via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 26 17:19:33 PDT 2023
jroelofs added inline comments.
================
Comment at: llvm/lib/Transforms/IPO/FunctionAttrs.cpp:1612
+ return false;
+ // If the call is marked unwindabort, an unwind may be converted into an
+ // abort, so we can't deduce willreturn for the containing function.
----------------
I don't understand the choice of the word "may" here. Isn't an unwind through an unwindabort supposed to /always/ lead to an abort?
================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:2401-2404
+ if (ResumeInst *RI = dyn_cast<ResumeInst>(&I)) {
+ if (MarkUnwindAbort)
+ RI->setUnwindAbort();
+ }
----------------
================
Comment at: llvm/lib/Transforms/Utils/Local.cpp:2595
+ // TODO: Currently we cannot annotate a catchswitch that cannot unwind, as
+ // it doesn't have a 'nounwind' attribute. Thus, it gets marked 'unwind to
+ // parent instead, and we lose the knowledge that it should be nounwind.
----------------
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141916/new/
https://reviews.llvm.org/D141916
More information about the llvm-commits
mailing list