[PATCH] D134866: [WinEH] Fix PreISel intrinsics in funclet catchret.dest blocks

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Sep 29 15:31:52 PDT 2022


efriedma added a comment.

Whatever rule WinEHPrepare uses to determine if the code is valid, the IR verifier should use the same rule, I think.  I don't think it makes sense to let IR pass the verifier if it's uncompilable due to coloring rules; that just makes bugs harder to understand.

Rewriting calls to "unreachable" does seem unfriendly.  It's possible funclet operand bundles are not the right choice.  I'm not sure what the "right" rule is here; probably any design has downsides.  Maybe we want to bias the design in favor of making "simple" transforms, like inserting instrumentation or lowering intrinsics, easy.

We could just write the rules for implicit coloring directly into LangRef, I guess.  catchpad and cleanuppad tokens significantly restrict the number of transforms that can actually mess up the IR without breaking some other rule.

--------

If we're going to relax the funclet bundle rules, I think we need to at least ensure that coloring fails reliably with a report_fatal_error if it's presented with uncolorable code. Does that happen currently?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D134866



More information about the llvm-commits mailing list