The RegAllocGreedy currently favours allocating a CSR over splitting a region.
With this change we try to defer allocating CSR by increasing the CSR cost when
none of user blocks in the live range contains a call. Similar change was
initially suggested by Nemanja in D27366 for PowerPC and Wei posted D32201 to
increase the CSR cost.
Comparing with D27366, this change is more conservative in splitting over allocating
CSR becuase we increase the CSR cost only when none of blocks in the live range
have call. Instead of a fixed arbitrary CSR cost, we increase the CSR cost considering
the number of tradable splits/spills against a spill of a CSR in the entry block.
I'm posting this since it seems that Nemanja is no longer pursuing D27366.
Hopefully this change open up more productive discussion and make progress
in the context-sensitive CSR cost model.
With this patch, I observed +10% performance gain in spec2006/astar in AArch64.