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: Redundant logical operations left after early splitting


hutchinsonandy@aim.com wrote:
If I understand correctly:

Prop. of "0" causes simplfy-rtx to create NOP from OR Rx,0
This NOP (deletion?) creates another set of potential uses - as now the prior RHS def now passes straight thru to a new set of uses - but we miss those new uses. (which in the testcase are often 0)


I will try fwprop in a few different spots latter and see what, if any changes occur.
Classic cascading.

I think some of this is an artifact of how your splitters are working.
You end up creating code which looks like


(set (reg1) (const_int 0) (set (reg1) (ior (reg1) (other_reg)

What's important here is that reg1 is being set multiple times.  You'd
be better off if you can twiddle the splitters to avoid this behavior.
If you need a new pseudo, then get one :-)

Once you do that, local would propagate these things better.  That
still leaves the simplification & nop problem, but I'm pretty sure
that can be trivially fixed within local without resorting to running
another forwprop pass after splitting.

Jeff


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