Re: fwprop and CSE const anchor opt

2009-04-08 Thread Richard Sandiford
Adam Nemet writes: > Richard Sandiford writes: >> If we have an instruction: >> >> A: (set (reg Z) (plus (reg X) (const_int 0xdeadbeef))) >> >> we will need to use something like: >> >>(set (reg Y) (const_int 0xdead)) >>(set (reg Y) (ior (reg Y) (const_int 0xbeef))) >>

Re: fwprop and CSE const anchor opt

2009-04-08 Thread Adam Nemet
Thank you very much. This was very informative. Richard Sandiford writes: > If we have an instruction: > > A: (set (reg Z) (plus (reg X) (const_int 0xdeadbeef))) > > we will need to use something like: > >(set (reg Y) (const_int 0xdead)) >(set (reg Y) (ior (reg Y) (cons

Re: fwprop and CSE const anchor opt

2009-04-06 Thread Richard Sandiford
Adam Nemet writes: > Richard Sandiford writes: >> Adam Nemet writes: >> > * Synthesizing multi-insns constants from const anchors make sense >> > regardless >> > whether the constant is used as an address so I am adjusting the cost >> > system >> > to make those stick independent of the context

Re: fwprop and CSE const anchor opt

2009-04-05 Thread Adam Nemet
Richard Sandiford writes: > Adam Nemet writes: > > * Synthesizing multi-insns constants from const anchors make sense > > regardless > > whether the constant is used as an address so I am adjusting the cost system > > to make those stick independent of the context. I still need to benchmark > >

Re: fwprop and CSE const anchor opt

2009-04-05 Thread Richard Sandiford
Adam Nemet writes: > Richard Sandiford writes: >> Adam Nemet writes: >> > In order for my CSE const anchor patch to work I needed to drastically >> > lower >> > the cost of immediate addition in the MIPS backend. This was acceptable >> > as a >> > proof of concept but not in general of course.

Re: fwprop and CSE const anchor opt

2009-04-04 Thread Adam Nemet
Richard Sandiford writes: > Adam Nemet writes: > > In order for my CSE const anchor patch to work I needed to drastically lower > > the cost of immediate addition in the MIPS backend. This was acceptable as > > a > > proof of concept but not in general of course. > > > > The problem is with "sin

Re: fwprop and CSE const anchor opt

2009-04-04 Thread Richard Sandiford
Adam Nemet writes: > In order for my CSE const anchor patch to work I needed to drastically lower > the cost of immediate addition in the MIPS backend. This was acceptable as a > proof of concept but not in general of course. > > The problem is with "single-insn"/simple constants. We would also

fwprop and CSE const anchor opt

2009-04-02 Thread Adam Nemet
In order for my CSE const anchor patch to work I needed to drastically lower the cost of immediate addition in the MIPS backend. This was acceptable as a proof of concept but not in general of course. The problem is with "single-insn"/simple constants. We would also like these to use const ancho