Hi, richi, On Feb 17, 2023, Richard Biener <richard.guent...@gmail.com> wrote:
> It seems the case should run into Yeah, but when the stmt is _7 = this_2(D), lhs is _7, whereas lhs_ref.ref is this_2(D), a parm decl's default def, so def_stmt is a gimple_nop, and this is not a decl_by_reference, so we don't skip stores.add, and any subsequent stores into fields of *this fails stores.add. This looks so fishy that I couldn't guess what was supposed or expected to happen there :-( > ? I wonder what the circumstances are that we want the latter to happen if > the former condition is true? Note that what I'm testing for, to skip non-store stmts, is the actual lhs, whereas lhs_ref.ref may very well have been resolved to the rhs (as in the cases I saw), and even if it could be an SSA_NAME, whether the stmt is a store depends on the actual lhs, not on properties of the rhs that get_ref resolved lhs to, right? Now, really, I did not get as far as trying to make sense of the algorithm in there (get_ref definitely doesn't do what its name suggests to me), I just saw a bunch of weirdnesses in blackbox testing and failing variations, that seemed to suggest some fundamental issue, that would hopefully be obvious to someone more familiar with that code. -- Alexandre Oliva, happy hacker https://FSFLA.org/blogs/lxo/ Free Software Activist GNU Toolchain Engineer Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about <https://stallmansupport.org>