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: IRA patch: move clobbers downwards


On 07/13/10 10:23, Bernd Schmidt wrote:
On 07/13/2010 06:19 PM, Jeff Law wrote:

Ideally, we'd just ignore the clobbers in the scheduler; however, that
might be a PITA to implement. But ISTM we ought to be able to shrink
the clobber's lifetime in a single pass over the insns after the
scheduler has run.
Well, that's exactly what my patch does.
Perhaps the thing to do is move it out of IRA and into sched-whatever.c :-)

Ignoring them isn't going to work, I think - where to place them depends
on the scheduling of other insns, but ideally the scheduling of other
insns won't depend on the clobbers.
The problem (as I see it) is the clobber has to issue prior to the insns with write-write dependencies. Finding a way to issue the clobber, then immediately issue the write-write dependent insns sounds ugly to implement. So the mental picture I was working with was to remove the clobber from the stream, schedule normally, then reinsert the clobber after scheduling was complete. There's some bookkeeping to do when we pull the clobber out of the stream, but in the absence of inter-block motions, this shouldn't be terribly hard.




Or we could build a real pressure reduction pass using much of the
scheduler's infrastructure.
Possibly something I have to do anyway for some of the PRs on my list.
I keep pondering the dependency analysis and scheduler's list handling as the way to solve lifetime shrinkage (probably to be run in response to the existence of unallocated pseudos). My gut tells me 90% of what we need is just sitting there.

Jeff


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