[PATCH] D146723: [SimplifyCFG] Don't merge invoke if this makes immarg non-constant (PR61265)

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 23 21:33:25 PDT 2023

mkazantsev accepted this revision.
mkazantsev added a comment.
This revision is now accepted and ready to land.

@nikic if I remember this correctly, the story here is following:

Because semantics of deopt bundle is defined by frontend/runtime, it may have some specific requirement, e.g. something is ought to be a constant known in compile time. If there is a transform that replaces constants with non-constants, you have two options:

- Disallow this (I guess this is what your patch is doing);
- Allow it, but undo this transform later (this is what we did a year ago when this test was introduced) when the fact of constantness starts to matter;

Personally I don't have a strong preference which approach we take, prohibition of such transforms seems even less headache to me.



More information about the llvm-commits mailing list