[PATCH] D156844: [Inliner] Add return attributes to callsites not marked `willreturn`
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 15 03:14:50 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1340
+ auto BeginIt = Begin->getIterator();
+ if (BeginIt == End->getIterator())
+ return true;
----------------
Can't happen? You can assert this instead.
================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:1406
+ MayContainThrowingOrExitingCallAfterCB(RetVal, RI) ||
+ RetVal->mayThrow())
continue;
----------------
Why do we need the unwind check? If the function unwinds, the attribute doesn't matter. If it doesn't unwind, then it will reach the nonnull.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156844/new/
https://reviews.llvm.org/D156844
More information about the llvm-commits
mailing list