Cost Calculation on Loop Invariant on Arithmetic operations on RTL
Ajit Kumar Agarwal
ajit.kumar.agarwal@xilinx.com
Tue Feb 17 08:45:00 GMT 2015
Hello All:
I can see the Loop invariant pass in the GCC on RTL considering the register pressure and the cost manipulation
With respect to SET destination node in RTL.
The Loop invariant takes care of only address arithmetic candidates of Loop invariance.
In the function get_inv_cost, I can see the following check for the updation of comp_cost and the comp_cost
Gets incremented with respect all the dependence on the def node of the invariant variable.
If (!inv->cheap_address || inv-def->n_addr_uses < inv->def->n_uses)
(*comp_cost += inv->cost + inv->eqno
Is there any specific reasons of addr_uses less than the actual uses check for the address arithmetic candidate
Of Loop invariant. I think we should be aggressive enough and can do the cost calculation without this check.
One more point the above cost calculation should not be considering the register pressure_costs.
Thoughts Please ?
Thanks & Regards
Ajit
More information about the Gcc
mailing list