Displaying 20 results from an estimated 1000 matches similar to: "[LLVMdev] register allocation"
2012 Jan 19
0
[LLVMdev] register allocation
On Jan 19, 2012, at 5:31 AM, Jonas Paulsson wrote:
> LLVM would have to be extended with an RegClass/register-attribute 'spillable'
What exactly are you proposing? Why can't you do what the PowerPC and Hexagon targets do?
Spill-free register allocation sounds great, why not do it for all register classes?
> , and a register allocator would have to implement register pairing.
2012 Jan 20
3
[LLVMdev] register allocation
> On Jan 19, 2012, at 5:31 AM, Jonas Paulsson wrote:
> LLVM would have to be extended with an RegClass/register-attribute 'spillable'
>
>
> What exactly are you proposing? Why can't you do what the PowerPC and Hexagon targets do?
Yes, I can move a CR to a GPR and save it to the stack, but due to a very irregular register file this is about 10 times more expensive
2012 Jan 20
0
[LLVMdev] register allocation
On Jan 20, 2012, at 6:40 AM, Jonas Paulsson wrote:
> > What exactly are you proposing? Why can't you do what the PowerPC and Hexagon targets do?
>
> Yes, I can move a CR to a GPR and save it to the stack, but due to a very irregular register file this is about 10 times more expensive than saving/restoring an ordinary register. These registers should basically never
> have to
2012 Mar 21
2
[LLVMdev] PBQP & CalcSpillWeights
Hi All,
I finally had a chance to get back to my pbqp trials, now using the 3.0
release. I still hit the same assert : "Attempting to spill already spilled
value."
This is triggered because in RegAllocPBQP::mapPBQPToRegAlloc, a vreg node is
either :
- a physical register (problem.isPRegOption(vreg, alloc)),
- or a spill (problem.isSpillOption(vreg, alloc))
The problem is that pass
2015 Jan 26
3
[LLVMdev] PBQP crash
Hi,
I have run into a test case on an out-of-tree target where PBQP fails to complete register allocation after "Attempting to spill already spilled value" (the triggered assert in InlineSpiller::spill().
First, the original LiveInterval is spilled. It is a load of a symbol into a narrow register class, i.e. a subset of the class of address registers. InlineSpiller decides to
2015 Jan 27
5
[LLVMdev] PBQP crash
> A node should never be put into the conservatively allocatable list if there is a chance of it spilling.
I can understand why the logic of NodeMetadata::isConservativelyAllocatable is necessary for the node to be allocatable, but I have not been able to convince myself this is sufficient, especially when the node degree > available registers.
Cheers,
Arnaud
From:
2015 Jan 30
0
[LLVMdev] PBQP crash
Hi Arnaud,
The conservatively allocatable test is supposed to check two conditions,
either of which would be sufficient to make a node allocatable:
(1) There exists some register that is not aliased by any register option
for any neighbor. This is the "safe row" test. It is straightforward, but
likely to fire only rarely.
(2) The sum of the maximum number of registers aliased by any
2012 Mar 23
0
[LLVMdev] PBQP & CalcSpillWeights
Hi Arnaud,
LiveInterval::markNotSpillable() sets the live interval's spill weight
to infinity. For well-formed PBQP graphs (i.e. ones that have some
finite-cost solution), PBQP should never chose to spill such an
interval. The two possibilities for this crash are that the input
graph has no finite-cost solution, or that you've exposed a bug in the
PBQP solver.
>From memory your target
2015 Jan 29
0
[LLVMdev] PBQP crash
Hi,
Sorry for the delay, it has taken some extra time as more than one bug showed up ☺
I continued to look into this with your viewpoint that a node that is conservatively allocatable should never be spilled. The first thing I did was therefore to add some extra code with an assert for this.
I believe I then found three bugs and fixed the two:
Bug 1: Incorrect transpositions in handleAddEdge()
2011 Apr 26
2
[LLVMdev] Register pairing in PBQP
Hi.
Im currently investigating LLVM's implementation of PBQP as a part of a
bachelors thesis im doing on register allocation for regular architectures.
In particullar, im looking at the possibility for improving the spill rate
of PBQP for a particular DSP architecture, by using register pairing.
>From reading the source code of lib/CodeGen/RegAllocPBQP.cpp i conclude
that support for
2011 Jun 07
2
[LLVMdev] PBQP & register pairing
I also considered this approach, but did not want to dive in the constraint handling for now.
The PBQP path seemed easier at first sight --- and was easy to setup. And I always wanted to give a try to the pbqp :)
I will add the hook to the pbqp and propose a patch if this looks clean enough.
Thanks,
--
Arnaud de Grandmaison
-----Original Message-----
From: Jakob Stoklund Olesen
2011 Jun 15
2
[LLVMdev] PBQP & register pairing
Attached is a small patch to allow users of the PBQP allocator to optionally insert a custom pass. I believe it can be usefull to other users of the pbqp.
I used it to undo some of the coalescer work, and make sure that I have different virtual registers, inserting a copy if necessary, to build a pair.
I noticed an unexpected --- to me at least --- behaviour of the allocator.
I have some
2011 Jun 07
0
[LLVMdev] PBQP & register pairing
Hi Arnaud,
That sounds great. I look forward to seeing a patch.
You may also look forward to big performance improvements in the PBQP
allocator: I'm working on updates which will improve compile speeds and
massively reduce memory use.
Regards,
Lang.
On Tue, Jun 7, 2011 at 7:02 PM, Arnaud Allard de Grandmaison <
Arnaud.AllardDeGrandMaison at dibcom.com> wrote:
>
> I also
2011 Jun 17
0
[LLVMdev] PBQP & register pairing
Hi Arnaud,
The patch looks good. I've committed it in r133249.
>
>
> I noticed an unexpected --- to me at least --- behaviour of the allocator.
>
> I have some instructions using 2 pairs of registers, say “mpra R_x, R_x+1,
> R_y, R_y+1”, and setting the pairing constraints R_x -> R_x+1 and R_y ->
> R_y+1 could silently produce wrong code like “mpra %R0, %R2, %R1,
2011 Jun 20
1
[LLVMdev] PBQP & register pairing
Hi Lang,
> Hmm. Let me make sure I'm reading this right. The constraints are that:
> a) All four operands have distinct registers.
> b) The first two are in a consecutive pair (second > first)
> c) The second two are in a consecutive pair (fourth > third)
Constraints b & c are OK, but a is too strict : "mpra %R0, %R1, %R0, %R1" is OK. But I though, may be
2012 Mar 26
2
[LLVMdev] PBQP & CalcSpillWeights
Hi Lang,
> From memory your target is not public, so I won't be able to reproduce
> the crash myself. Is that correct?
Correct.
> If that's the case, I could add functionality to dump the PBQP graphs
> during allocation. I think they should give me enough information to
> debug the issue. Would you be able to share the PBQP graphs?
I can share the pbqp graph if you send
2012 Apr 05
2
[LLVMdev] PBQP & CalcSpillWeights
Hi Lang,
Thanks a lot for taking time to look into this. I will test the fix soon and
let you know the results.
Cheers,
--
Arnaud de Grandmaison
On Tuesday, April 03, 2012 17:30:33 Lang Hames wrote:
> Hi Arnaud,
>
> Apologies for the delayed reply.
>
> Thank you for the excellent test case - it exposed a subtle bug in the
> colorability heuristic. This has been fixed in
2012 Apr 19
1
[LLVMdev] PBQP & CalcSpillWeights
Hi Arnaud,
I'm glad to hear that your test case is working.
I however still get my wrong allocation in some non trivial cases : the
> pairing constraint is not fulfilled.
>
> I have tried to modify the 'ensure pairable' pass (the pass undoing some
> of the coalescer's work) to always insert register copies for
> instructions with the pairable constraint, instead of
2011 Jun 06
2
[LLVMdev] PBQP & register pairing
Hi All,
My target has some instructions requiring register pairs. I decided to give a try to the PBQP allocator : it is working fine in 99% of the cases, but I am stumbling on the following issue.
Instruction 'MPQD' takes 3 register operands inputs, with the constraint that operands 0 and 2 must be consecutive registers. Operand 1 has no particular constraint. It has no output register.
2012 Apr 11
0
[LLVMdev] PBQP & CalcSpillWeights
Hi Lang,
The assert is not triggered any longer on my testcases :)
I however still get my wrong allocation in some non trivial cases : the
pairing constraint is not fulfilled.
I have tried to modify the 'ensure pairable' pass (the pass undoing some
of the coalescer's work) to always insert register copies for
instructions with the pairable constraint, instead of being smart and