[clang] [CIR] Mark the terminator synthesized for function fall-off as implicit (PR #238696)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 4 11:10:33 PST 2026


erichkeane wrote:

> > The only alternative I could come up with was to leave the 2-builtins as 'calls' and just have one of the lowering steps normalize these to trap/unreachable instead (and thus run CFG before that?) but I'm not sure I see particular value in that.
> 
> Just to clarify further: when you call __builtin_trap(), __builtin_verbose_trap() or __builtin_unreachable() directly, the op is never marked implicit! It's just for the cases where the compiler would automatically insert those builtins.

Yep! I understood that.  My thought was that we have a DIFFERENT operation of some sort for explicitly called versions that 'lower' at one point (after diag, but before opt?) to the ones you're adding 'implicit' to, instead of adding implicit.

BUT I am on the fence as to the VALUE of that.  The attribute seems 'good enough' to me? 

https://github.com/llvm/llvm-project/pull/238696


More information about the cfe-commits mailing list