search for: csrcost

Displaying 7 results from an estimated 7 matches for "csrcost".

2017 Oct 30
2
Less aggressive on the first allocation of CSR if detecting an early exit
...etI(i); >> >> return P[i]; >> >> } >> >> It's not that hard to find such cases where RegAllocGreedy >> aggressively allocates a CSRs when a live range expands across a >> call-site. That's because of the conservatively initialized >> CSRCost, causing RegAllocGreedy to strongly favour allocating a CSR >> over splitting a region. Since allocation of CSRs requires the cost >> of spilling CSRs, allocating CSRs is not always beneficial. Like the >> case above, if a function has an early exit code, we may want to be >&gt...
2017 Nov 17
2
Less aggressive on the first allocation of CSR if detecting an early exit
On 2017-11-17 13:10, Quentin Colombet wrote: >> On Nov 16, 2017, at 2:31 PM, junbuml at codeaurora.org wrote: >> On 2017-11-14 17:22, Quentin Colombet wrote: >> >>> Hi, >>> I think it is kind of artificial to tie the CSRCost with the >>> presence >>> of calls. >>> I think I’ve already mentioned it in one of the review, but I >>> believe it would be better to differentiate when we want to use a >>> CSR >>> to avoid spilling or to avoid splitting. CSR instead of spill...
2017 Nov 16
2
Less aggressive on the first allocation of CSR if detecting an early exit
On 2017-11-14 17:22, Quentin Colombet wrote: > Hi, > > I think it is kind of artificial to tie the CSRCost with the presence > of calls. > I think I’ve already mentioned it in one of the review, but I > believe it would be better to differentiate when we want to use a CSR > to avoid spilling or to avoid splitting. CSR instead of spilling is > good, CSR instead of splitting, not so good :)...
2017 Oct 31
2
Less aggressive on the first allocation of CSR if detecting an early exit
...>>>> } >>>> >>>> It's not that hard to find such cases where RegAllocGreedy >>>> aggressively allocates a CSRs when a live range expands across a >>>> call-site. That's because of the conservatively initialized >>>> CSRCost, causing RegAllocGreedy to strongly favour allocating a CSR >>>> over splitting a region. Since allocation of CSRs requires the cost >>>> of spilling CSRs, allocating CSRs is not always beneficial. Like the >>>> case above, if a function has an early exit code, w...
2017 Nov 10
2
Less aggressive on the first allocation of CSR if detecting an early exit
On 2017-11-10 07:47, Nemanja Ivanovic wrote: > One thing I thought about doing a while back and never really wrote a > POC for is the following: > - Make FirstCSRCost a property of the MachineBasicBlock (or create a > map of MBB* -> FirstCSRCost) > > - Implement a pre-RA pass that will populate the map as follows: > > - Identify all blocks with calls > > - Find the nearest common dominator (NCD) to all those blocks (not > strict...
2017 Oct 27
2
Less aggressive on the first allocation of CSR if detecting an early exit
...int foo(int *P, int i) { if (i>0) return P[i]; i = getI(i); return P[i]; } It's not that hard to find such cases where RegAllocGreedy aggressively allocates a CSRs when a live range expands across a call-site. That's because of the conservatively initialized CSRCost, causing RegAllocGreedy to strongly favour allocating a CSR over splitting a region. Since allocation of CSRs requires the cost of spilling CSRs, allocating CSRs is not always beneficial. Like the case above, if a function has an early exit code, we may want to be less aggressive on the first alloc...
2017 Oct 03
5
General question about enabling partial inlining
Hi Graham, Thanks for sharing this. Are you planning on enabling the pass only on PGO? Even in non-PGO, I noticed some performance gains when we are aggressive in partially inlining the early return part, especially when the callee spill CSRs in the entry block. At a high level, I have two questions: 1. What is the main obstacle that prevent the pass from being enabled by default? 2.