Hi again,

Thanks for your answer to my other question.

I just found a case, where an allocno wasn't getting a register,
when I thought it should, since it was referenced 24 times.
I looked in setup_allocno_priorities() to see how this was used
to determine the priority and found this line:

mult = floor_log2 (ALLOCNO_NREFS (a)) + 1;

All other things being equal, this means something that is
referenced 16 times will get the same priority as something
referenced 31 times.  I just changed this line to remove the
floor_log2 and got better results on my test case.

I'm wondering what the origins of the floor_log2 are?  You
scale everything based on max_priority and INT_MAX later,
so I don't see the harm in using the nrefs as the multiplier
in the first instance, and I actually think this would be
more representative of the impact of an allocno not
getting a register.

NOTE: I am still using the Priority algorithm because that
performs better than CB on our architecture at the moment.

Cheers,
Ian

Reply via email to