On 7/9/25 12:27 AM, Richard Biener wrote:
The following changes the percentage that determines how many
stmts are allowed for backwards jump threading from 50 to 54,
enabling the missed jump threading observed in PR109893.

Bootstrapped and tested on x86_64-unknown-linux-gnu.  It seems that
at least backward threading is prone to profile mismatches, I've
altered two testcases to deal with new ones to pop up (definitely
latent issues).

OK?

        PR tree-optimization/109893
        * params.opt (fsm-scale-path-stmts): Change from 50 to 54.

        * gcc.dg/tree-ssa/pr109893.c: New testcase.
        * gcc.dg/tree-prof/cmpsf-1.c: XFAIL.
        * gcc.dg/tree-ssa/pr109893.c: Remove scan on no profile
        mismatches.
My recollection is the scaling factor was set one based on some old PR where code size exploded and wasn't really tuned further after that. If the new value is working better, then that's obviously fine with me. Ideally we'd just get rid of the magic ratio....

Jeff

Reply via email to