> Hmm, also in ASM/call/return? It will definitely make quite a fuzz into the > cost metric > by making a=b+c to have cost of 3 instead of 1 as it have now. I am not 100% > sure if > a+b should be more expensive than a+1. > I can give that a try and we will see after re-tunning how well it works. > Diagonal walk > of multi-dimensional array, i.e. a[b][b][b] will be mis-accounted, too, right?
Other problem I see is how to account this in the inliner. At the moment I have call (a,b,c) to be cost of the edge and if we inline the cost disappear completely, but call (a[b],c) have the address calculation not accounted to the edge (since inlining does not eliminate it), just the call itself accounted. With the change we will not know if the parameters are simple SSA names or something non-trivial. Honza > > Honza