[Bug debug/54402] [4.8 Regression] var-tracking does not scale

jakub at gcc dot gnu.org gcc-bugzilla@gcc.gnu.org
Mon Oct 29 17:14:00 GMT 2012


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54402

Jakub Jelinek <jakub at gcc dot gnu.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |ASSIGNED
         AssignedTo|unassigned at gcc dot       |jakub at gcc dot gnu.org
                   |gnu.org                     |

--- Comment #8 from Jakub Jelinek <jakub at gcc dot gnu.org> 2012-10-29 17:13:45 UTC ---
Created attachment 28562
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28562
gcc48-pr54402.patch

For the go1 testcases, the issue really is that with reload the large function
is not using frame pointer, while with LRA it is.
And with frame pointer, the issue is that because there is the stack check bb
before prologue (but, generally, any shrink wrapped function with the hfp
setting prologue not in succ of entry bb) and vt_initialize was trying to be
extra conservative, we wouldn't do the hfp to argp replacements, and ended up
with a VALUE (for hard frame pointer in one of the blocks) with 1173 locs,
mostly reverse_op of other values.

This patch fixes the particular issue by not requiring the fp setter to be in
the entry bb successor (and I've just in case added there a check that it
doesn't trigger on fp restore).

If we hit this kind of issue on some other testcase with a non-sp/hfp value,
I'd say what we could do is mark somehow what locs values are reverse ops, and
let functions like find_base_term or get_addr always ignore all reverse op
locations (perhaps if reverse ops were guaranteed to be always at the end of
the locs chain, find_base_term or get_addr could just stop on the first reverse
op location).  The question is how to do that, the structure contains just 3
pointers and thus there is no place to stick something on, perhaps there could
be some extra location chain entry with some magic value that would be ignored
or similar.



More information about the Gcc-bugs mailing list