[llvm-commits] [llvm] r78354 - in/llvm/trunk/lib/CodeGen:PBQP.cpp PBQP.h PBQP/PBQP/AnnotatedGraph.hPBQP/ExhaustiveSolver.hPBQP/GraphBase.hPBQP/GraphGenerator.h PBQP/HeuristicSolver.hPBQP/Heuristics/PBQP/Heuristics/Briggs.h PBQP/PBQPMath.h

Alireza.Moshtaghi at microchip.com Alireza.Moshtaghi at microchip.com
Mon Aug 10 11:27:32 PDT 2009


> The Briggs heuristic has been rewritten to eagerly evaluate
> colorability of RN nodes whenever one of their neighbours is removed.
> This may lead to the C++ solver finding different solutions than the C
> solver, however the cost of solutions found should, on average, be the
> same.

That explains why the resulted code has changed for us; because now that
you have brought colorability into the equations, since PIC16 only has
one register, all nodes are same color and effectively the new algorithm
will not behave as efficiently. For PIC16, the order of code generation
for each path from DAG and how data is flown from one path to the other
is the most important factor. Using solver to find the best solution is
the attractive part of PBQP for us. Do you think there is anything that
we can still use from PBQP? or we have to start thinking of writing our
own register allocator?

Thanks
Ali



> 
> Cheers,
> Lang.
> 
> On Mon, Aug 10, 2009 at 10:11 AM, <Alireza.Moshtaghi at microchip.com>
wrote:
> > Hi Lang,
> > I read the papers regarding PBQP and it seemed like it has the
potential
> > to be useful for the single register of PIC16, (maybe an overkill
but it
> > has been working fine so far). I was wondering if you can let me
know a
> > little bit about the nature of your modifications. I see that you
have
> > mainly refactored the code into C++ classes, but have you also made
> > algorithmic changes?
> >
> > Thanks
> > Ali
> >
> >> -----Original Message-----
> >> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> >> bounces at cs.uiuc.edu] On Behalf Of Lang Hames
> >> Sent: Sunday, August 09, 2009 10:29 PM
> >> To: Evan Cheng
> >> Cc: Commit Messages and Patches for LLVM
> >> Subject: Re: [llvm-commits] [llvm] r78354 - in
> >> /llvm/trunk/lib/CodeGen:PBQP.cpp PBQP.h PBQP/
> >> PBQP/AnnotatedGraph.hPBQP/ExhaustiveSolver.h
> >> PBQP/GraphBase.hPBQP/GraphGenerator.h PBQP/HeuristicSolver.h
> >> PBQP/Heuristics/PBQP/Heuristics/Briggs.h PBQP/PBQPMath.h
> >>
> >> On Sun, Aug 9, 2009 at 9:52 PM, Evan Cheng<evan.cheng at apple.com>
> > wrote:
> >> > I somehow doubt PBQP is very good fit for a single register
target.
> >>
> >> No I don't think so. I certainly appreciate the test case though.
Any
> >> feedback I can get as I try to improve the allocator is welcome.
> >> Thanks Sanjiv.
> >>
> >> Cheers,
> >> Lang.
> >> _______________________________________________
> >> llvm-commits mailing list
> >> llvm-commits at cs.uiuc.edu
> >> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> >
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list