> > the problem here is that we consider &param.foo to be a memory reference,
> > while it is not. The following patch should fix it, but because it changes
> > the behaviour of inline heuristics, I will run bechmarks tonight before
> > committing it.
> 
> Thanks in advance.  Can you add PR tree-optimization/50433 to the ChangeLog?

The tests tonight shows quite good results - there are quite consistent code 
size
reductions on C++ code w/o slowdowns so I've comitted the patch.
Sadly tramp3d does not build and the heuristics was implemented with tramp3d in 
mind.
Important behaviour change is that the heuristic now matches only for parameters
passed by value not for parameters passed by reference. I however have the 
patch for
tracking the second more consistently with aid of the new predicate 
infrastructure
so I guess I will fix the possible regression on tramp3d other way.

I've comitted the patch.  I never added Ada testcase, but it would make sense 
if you
commit it if that ICE is not covered by some other Ada test already.

Honza

Reply via email to