Re: Calculation of RTX Costs

2010-09-24 Thread Paulo J. Matos
Ian Lance Taylor writes: > pocma...@gmail.com (Paulo J. Matos) writes: > > For most processors it's not important to get all costs exactly correct. > The compiler uses the costs in a relatively brute force manner. If > there is only one way to do some operation, then its cost is irrelevant. > Co

Re: Calculation of RTX Costs

2010-09-23 Thread Ian Lance Taylor
pocma...@gmail.com (Paulo J. Matos) writes: > So, from what I understand, it seems that if there is machine > independent code using COSTS_N_INSNS, I should be using it otherwise > relative comparisons just don't make sense. > > However, from what I can see we have cost hooks for: > - register mov

Re: Calculation of RTX Costs

2010-09-23 Thread Paulo J. Matos
Ian Lance Taylor writes: > pocma...@gmail.com (Paulo J. Matos) writes: > >> Moreover, is there a reason for the existence of COST_N_INSNS(x) and why >> this multiplies x by 4? Is 4 just a special number? Any reason on why I >> should be using COST_N_INSNS instead of just assigning *total (of >> t

Re: Calculation of RTX Costs

2010-09-21 Thread Ian Lance Taylor
pocma...@gmail.com (Paulo J. Matos) writes: > I would like some clarification on the meaning of RTX Costs. > When optimising for speed I assume they estimate the time at which the > final generated code is going to take to execute for each rtx. > When optimising for size it is the estimated number

Calculation of RTX Costs

2010-09-21 Thread Paulo J. Matos
Hello, I would like some clarification on the meaning of RTX Costs. When optimising for speed I assume they estimate the time at which the final generated code is going to take to execute for each rtx. When optimising for size it is the estimated number of words that each rtx will generate in the