This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: increase call_saved_regs[] in caller-save.c


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 11/03/11 13:13, DJ Delorie wrote:
>> But doesn't that imply that a hard register is getting inserted
>> into the array more than once.  While I don't see explicit code
>> to prevent this, I'm having a hard time seeing how that can
>> actually happen.
> 
> The test case is qsort.c from newlib.  I added some runtime checks
> to caller-saves and it looks like there are at least two pseudos
> assigned to the same hard reg, so the hard reg gets added more than
> once.  Is this normal?
It's certainly normal to have multiple pseudos assigned to the same
hard reg, but never at the same time.  ie, the lifetimes of the
pseudos must not overlap.

The only way I can think of to have two pseudos assigned the same hard
reg at the same point in the insn stream is if the two pseudos are
known to have the same value.  I'm don't think IRA implements this
particular optimization -- I vaguely recall Vlad talking about it and
mentioning that it wasn't worth the implementation effort.

So I guess the first thing to do is see if you've got two pseudos in
the same hard reg at a single point and then figure out how/why that
happened.  You ought to be able to detect this within the
EXECUTE_IF_SET_IN_REG_SET loop.

Jeff



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/

iQEcBAEBAgAGBQJOtC38AAoJEBRtltQi2kC7lEgIAKeub93zP9QZ23d0oF/7ItPl
GqmZk9kJhZKgBcnh6CbNIZaiDshEAPDtFInj/FrXAvbn/8bqdRr2GGALqxaoppeI
zJiuydWNAcI2TjgEYb1+MxWfkyj03LYdDp44ivaDL6G7B2vCAi6ckVjUTG6XYDjV
fcfXhBxFTfaIW4zl3RtuLo0fCDB3xjLFVLTrgKriRZuGifDNTNBcRormgG92PKd/
8DpNwwH0EOtUkw7Xe881D8xXnFaTYzTkC4RtpMg4EtHEZPwDQzjGInO1utLYNAY1
OfmoVA1AXYoc9FQxkSlcw9oEUmY7kj3mqcX9oIh/9L4H75KFATkx3pthLcuZ7Sg=
=MPlS
-----END PGP SIGNATURE-----


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]