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: Constant propagation and address arithmetic


On Sun, 2005-05-08 at 14:24 -0700, Richard Henderson wrote:
> On Sun, May 08, 2005 at 10:26:19PM +0200, Steven Bosscher wrote:
> > Oops.  Not a modified tree, non-standard command line options:
> > -O -fgcse --param max-cse-path-length=1
> 
> Ah, I see.  Well, I think this is a misfeature of gcse in how
> it decides how to update expressions.  With a bit more thought
> we could do better.
> 
> For instance, given
> 
> (insn 13 8 15 0 (set (reg/f:SI 121)
>         (high:SI (symbol_ref:SI ("x") [flags 0x44] <var_decl 0xf7d5e3c0 x>)))
>     218 {elf_high} (nil) (nil))
> 
> Register 121 used 1 times across 0 insns; set 1 time; dies in 0 places; pointer.
> 
> We can see that insn 13 dominates all uses of (high (symbol_ref x)),
> so why don't we make *that* the reaching reg?

RTL GCSE seems to be doing this quite a bit, there are a couple bug
reports where it's inserting things where they are clearly available
already.

INSERT is supposed to include "- AVOUT",, to avoid placing things where
they are already available.

See, for example, the insertin equation in:
http://www.cs.princeton.edu/~ras/partial.ps
or in the presentation of
http://www-2.cs.cmu.edu/afs/cs/academic/class/15745-s05/www/lectures/Lpre.pdf

So i'm actually a bit concerned that our dataflow is screwed up, but i
haven't had time to see whether this is really true or not.

--Dan







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