This is the mail archive of the gcc@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: If-conversion misses many cases


On Wed, 2004-02-25 at 04:06, Jan Hoogerbrugge wrote:
> It seems that if-conversion is blocked in the first two cases because of 
> unlucky register allocation.

This is a possibility.  You probably should look into this a bit more,
and see why you are getting the unlucky register allocation.

If your target has different characteristics than IA-64, then you might
need to extend the if conversion pass so that it works well for your
target.

Since I do not have a copy of your port, I can not debug it for you. 
Nor do I have any special interest in spending time debugging your
port.  I am only trying to help answer questions about gcc internals.

> Another issue.... In the assembly code above you see that the instruction 
> that loads the address of s in a register is also predicated. (That is also 
> happening in the ia64 port). This is not necessary. In fact, it makes it 
> dependent on the compare instruction which means less parallelism.

Looking at the IA-64 RTL dumps, I see that this is a local-alloc
problem.  update_equiv_regs has code to detect when a register is set to
a constant and only used once.  In this case, we delete the initializing
instruction, and re-emit the constant load right before the use.  This
reduces register pressure, but has the unfortunate side-effect of
decreasing ILP, resulting in worse code for targets like IA-64.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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