https://gcc.gnu.org/bugzilla/show_bug.cgi?id=119683

--- Comment #6 from Richard Biener <rguenth at gcc dot gnu.org> ---
Deeply buried in my TODO is to have a "folding context" where we'd put things
like the mprts_hook, the valueization function to use and possibly the
context we're working from (edge, BB, stmt).  That would be either global
(and a way to push/pop contexts) or the base class for all folding calls
(that's much more invasive, of course).

Auto-discovery of a context is difficult since places like VN fold
expressions that do not exist as-is in the IL, still there's a context
available.

Cheap, ugliest hack: add a gimple *mas_ctx; besides mprts_hook and use
that and make sure to set it correctly and never leave it set incorrectly.

Reply via email to