This is the mail archive of the
mailing list for the GCC project.
Re: IRA patch: move clobbers downwards
- From: Jeff Law <law at redhat dot com>
- To: Vladimir Makarov <vmakarov at redhat dot com>
- Cc: Bernd Schmidt <bernds at codesourcery dot com>, GCC Patches <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 13 Jul 2010 10:19:12 -0600
- Subject: Re: IRA patch: move clobbers downwards
- References: <4C3C34B4.firstname.lastname@example.org> <4C3C8661.email@example.com>
On 07/13/10 09:29, Vladimir Makarov wrote:
Bernd Schmidt wrote:
You know, this sounds an awful lot like a discussion I had with David E.
a while back.
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
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.
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.
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
Interestingly enough, reload's use of REG_DEAD notes caused me some
major grief recently. I'll spare everyone the details.
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
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.