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


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.
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.
Bootstrapped and regression tested on i686-linux, also regression tested
on ARM.  Ok?


Bernd, could you check please that -fsched-pressure solves the problem.



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