[PATCH] D127962: [WinEHPrepare] Propagate funclet tokens when inlining into EH funclets

Stefan Gränitz via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 20 05:51:02 PDT 2022


sgraenitz added a comment.

Thanks for your feedback.

In D127962#3590140 <https://reviews.llvm.org/D127962#3590140>, @rnk wrote:

> I think the generic predicate we are looking should be called something like `IntrinsicInst::mayLowerToFunctionCall`, and it would be true for these ObjC ARC intrinsics, statepoint, and anything else like that. Basically, we should apply funclet operand bundles to intrinsics that lower to function calls.

I was not aware it would be such a broad issue! So far, I was trying to narrow the condition to my ObjC ARC use-case as close as possible. D128190 <https://reviews.llvm.org/D128190> aims to apply bundle operands correctly for intrinsics that lower to function calls and covers both cases, emit and inline, at once. If this is ok, I can close the two reviews here.



================
Comment at: llvm/lib/Transforms/Utils/InlineFunction.cpp:2317
+          bool PropagateExplicitly = false;
+          if (Personality == EHPersonality::MSVC_CXX) {
+            using namespace llvm::objcarc;
----------------
rnk wrote:
> The personality check should not be necessary. We check CallSiteEHPad above, and that's enough to imply that the current function uses funclet bundle operands. (Wasm, SEH, C++ EH)
Alright, I assume then it's not necessary in `clang/lib/CodeGen/CGCall.cpp` either.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127962/new/

https://reviews.llvm.org/D127962



More information about the llvm-commits mailing list