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: [PATCH 1/X, i386, PR54232] Enable EBX for x86 in 32bits PIC code


On 10/14/14 07:00, Jakub Jelinek wrote:

For the first two, I think (and said it before already) that the current
model of emitting set_got from a target hook during RA can't work, as there
can be calls in the prologue, and the prologue is inserted before the
set_got in that case.  I really think the RA should in that case just tell
the backend whether and in which register it wants to have the PIC register
loaded upon start of the function, and it should be emit prologue pass
that should arrange for that.
That works for me -- I've been encouraging Intel to push emitting the PIC setup further and further back in the RTL pipeline. Their early patches had it very early in the RTL pipeline and naturally there was fallout/bleedout in various places in the optimizers.

I don't see much value in emitting the PIC setup prior to allocation, all I see is problems.



As for the code quality, either some RA improvements are needed, or
postreload must be able to fix it up, or hardreg propagation (though,
cprop_hardreg is forward propagation rather than backwards, right?).
Better before prologue is emitted though, because that will save/restore
the badly chosen hard reg too.
RA improvements are the way to go -- however, my understanding is that overall the code is better now than it was before Intel's changes, so I don't consider the performance side as a blocker for this code.

The biggest performance issue identified so far is rematerialization. The initial patch Intel sent to me was totally unacceptable as it just hacked off optimizers rather than digging into the guts of why IRA/LRA was unable to sanely rematerialize the PIC register value.

jeff


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