usx95 wrote: It looks like largely there are two independent pieces here: 1. In lifetime safety: while handling ternary op, "consult" the cfg to see if successor branches are sinking (precise: isInevitablySinking, imprecise: noreturn) 2. In CFG, Memoize isInevitablySinking (for 'precise').
I think the "consult" part of 1. would be equally complex between precise and imprecise alternatives because it would involve going from the AST back to the CFG. (Is this the part which is not working for you ?) Ideally 1 and 2 belongs to separate PRs, we can try to have `1` in this PR using the slow and precise `isInevitablySinking`. The performance regression is relatively restricted to ternary operators, so this could be acceptable temporarily until we have 2. WDYT @Xazax-hun ? https://github.com/llvm/llvm-project/pull/190345 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
