This is the mail archive of the
mailing list for the GCC project.
Re: REVISED PATCH: adjust init_set_costs to account for call_used_regs (PR42505)
Zdenek Dvorak wrote:
what about simply increasing the value of target_res_regs, instead? After all,
target_res_regs is intended to acount for the scratch registers etc.
What about performance results on some mainstream architecture, say x86_64?
I'm out of time for further experimentation and benchmarking; my manager told me
2 weeks ago already that I'd spent enough time on this bug. At this point, I
just want to get something checked in that prevents ivopts from thinking it has
9 registers available when it only has 4 because of the call in the loop. If
adding the additional register pressure parameter is unacceptable without
further experiments, I'll remove it entirely.
This needs to be a bit more careful -- you should exclude builtin calls that will
not be expanded to real function calls (e.g., builtin_prefetch),
Is there code elsewhere in the compiler that knows which builtins are guaranteed
not to expand into a real function call? I looked quickly and it seems other
middle-end passes do not attempt to differentiate builtins from regular calls.
If there is not already such code I can borrow, see my comment above about being
out of time. ;-) I'll argue again here that, in the absence of more specific
analysis, it is more conservatively correct for the register pressure
computation to assume that the call-clobbered registers are unavailable than to
assume that they are, as the costs of being wrong are much higher in the latter