[PATCH] Do not use invalid log links

Richard Henderson rth@redhat.com
Wed Aug 24 22:44:00 GMT 2005


On Wed, Aug 24, 2005 at 10:02:37AM +0200, Paolo Bonzini wrote:
> 	* regmove.c (reg_is_remote_constant_p): Reorganize to not use log links.
> 

As far as it goes, this is ok.  However, the routine is a bit buggy.

There are a couple of things it should do:

(1) Use REG_BASIC_BLOCK as a smoke test.  If it equals BLOCK_FOR_INSN,
    then you know the value is confined to the current block, and can
    return false without knowing whether it's a constant.

(2) The scan from "first" is doltish.  It may scan the current block
    twice.  It doesn't scan all blocks.  The second loop should be 
    rewritten to use FOR_EACH_BB.


r~



More information about the Gcc-patches mailing list