[Bug rtl-optimization/37273] [4.4/4.5/4.6 Regression] IRA does not re-materializes addresses (loads from the TOC)

law at redhat dot com gcc-bugzilla@gcc.gnu.org
Wed Jan 12 13:51:00 GMT 2011


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

--- Comment #5 from Jeffrey A. Law <law at redhat dot com> 2011-01-12 13:38:20 UTC ---
First I think we need to note that if we allocate the pseudo holding the value
for "ext" in memory that we get some savings (because "ext" is already sitting
in memory waiting to be used).

This is very similar to how we recognize some savings from allocating a pseudo
to memory when the pseudo represents an argument loaded from its stack slot in
ira-costs.

Second, in that same code, we're double-counting the cost of allocating the
pseudo to memory.

If those two problems are fixed, we get the desired PPC code; however,
significant benchmarking would be required to determine how this change affects
a broader codebase.

I'll note there's also a deficiency in caller-saves in that it insists on
reloading the value into its original hard reg, even if the hard reg is going
to be immediately copied to a different hard reg.  I don't want to spend too
much time on the caller-save aspects since ultimately I think caller-save needs
to go away or at least have another rewrite.  It's approaching 2 decades since
it's last major revision.



More information about the Gcc-bugs mailing list