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

Richard Biener <rguenth at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |rguenth at gcc dot gnu.org

--- Comment #4 from Richard Biener <rguenth at gcc dot gnu.org> ---
(In reply to Andrew Pinski from comment #3)
> PRE is removing the line numbers for some reason.

PRE creates expressions for values out of thin air - there isn't a
"correct" line number it can use.

So we end up with the following after PRE insertion:

 pre_inserted = sin (x); // no line number
 if (...)
   original1 = sin (x);
 original2 = sin (x);

at the time we perform CSE on this we could in theory attach line
numbers to pre_inserted when replacing a sin (x) call with pre_inserted.
But we have two - so which one do we choose?

Note the line number program should have picked up a location from the
surrounding code, at least the surrounding function, so the ?? in the
backtraces look like a consumer (perf) issue to me.

Yes, the sin() call may fall out of an inlined function context or even end up
in
the wrong one if you consider inlining two different functions
calling sin on the same value.  But again I don't see a good way to
"fix" this.

Reply via email to