This is the mail archive of the 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 09:29, Vladimir Makarov wrote:
Bernd Schmidt wrote:
This is an older patch I'm resubmitting.  The scheduler can move reg
clobbers away from the insns for which they were generated, generating a
window during which IRA thinks the register is live when it isn't.  This
can cause unnecessary conflicts.

I am not sure that this is the right place to fix this problem. Common sense is saying me that it should be solved in the first place (insn scheduling).

Moreover I am not sure that this problem is not solved already with -fsched-pressure. If it is not it could be easily solved by using the infrastructure for -fsched-pressure.
You know, this sounds an awful lot like a discussion I had with David E. a while back.

ISTM the CLOBBER should be completely ignored by scheduling. The clobber serves no purpose other than to tell the dataflow analyzers that a double-word value is going to be completely replaced.

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.

Or we could build a real pressure reduction pass using much of the scheduler's infrastructure.

The real problem here is that IRA does a backwards scan; just as in
peep2, it would probably be better to use a forwards scan using REG_DEAD
notes.  However, I'm told it's expensive to create those.

Originally, it was done on the forward scan in IRA. As I know for many people the final goal was to remove REG_DEAD notes. I was not in a hurry to implement the backward scan because the major problem of removing REG_DEAD is the reload pass which uses it. But Richard Sandiford made a patch to use a backward pass. We invested a lot of efforts to solve all (non-trivial) problems of the backward pass patch. So I think it is quite unreasonable to switch back to the forward pass.
Interestingly enough, reload's use of REG_DEAD notes caused me some major grief recently. I'll spare everyone the details.


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