How to avoid common subexpression elimination under this situation?

Paolo Bonzini bonzini@gnu.org
Tue Oct 23 12:24:00 GMT 2007


> In RTL level, it is difficult to reverse the optimization. In our 3.4.6
> -based porting, the GCC actually generates the latter code. How to
> avoid CSE under such situation? Any suggestion is greatly appreciated.

You are probably not defining the ADDRESS_COST or (if you have no 
ADDRESS_COST hook at all) the RTX_COSTS hook properly.  Addressing mode 
selection is done at RTL-level.  In 4.2.1 the RTL CSE pass will undo the 
CSE (yes, I know it's confusing!...) if the hooks are implemented 
properly; in 4.3.0 it will be fwprop who does the CSE undoing.

Paolo



More information about the Gcc mailing list