Ran out of registers error in llc
qcolombet at apple.com
Wed Jun 11 19:12:41 PDT 2014
I haven’t look yet at all your inputs, but the MachineInstr dump for bugpoint.txt looks suspicious.
Let me take an example:
BB#0: derived from LLVM BB %entry
Live Ins: %R0 %R1 %R2 %R11 %LR
%R4<def> = MOVr %R0, pred:14, pred:%noreg, opt:%noreg
%R7<def> = MOVr %R1, pred:14, pred:%noreg, opt:%noreg
%R8<def> = MOVr %R2, pred:14, pred:%noreg, opt:%noreg
%R9<def> = MOVr %R3, pred:14, pred:%noreg, opt:%noreg <— R3 is not live in nor defined before being used
%R10<def> = MOVr %R11, pred:14, pred:%noreg, opt:%noreg
%R5<def> = SUBrr %R5, %R5, pred:14, pred:%noreg, opt:%noreg <— Same for R5
My questions are the following:
1. When does your pass run?
2. Have you checked that the produced MachineInstr IR is valid (by running the verifier after your pass)?
Let us first solve the verifier issues, then we will see if the register allocator is at fault.
On Jun 11, 2014, at 6:31 PM, Danna bib <danna1364 at gmail.com> wrote:
> Hi Dear Quentin,
> Thank you for your response.
> I ran bugpoint, and attach the outputs to this email. Hopefully they help.
> My command line is this:
> ~/Desktop/Mibench/consumer/jpeg/jpeg-6a$ llc -reserveRegs=true -march=arm -O0 cjpeg.ll -o cjpeg.s
> error: ran out of registers during register allocation
> For running bugponit I used this:
> bugpoint cjpeg.ll -llc-safe --safe-tool-args -reserveRegs=true -march=arm -O0 | tee bugpoint.txt
> My goal is duplication of almost all assembly instructions (for applying some fault-tolerant method), So, I need to reserve half of registers for those duplicated instructions.
> On Mon, Jun 9, 2014 at 2:43 PM, Quentin Colombet <qcolombet at apple.com> wrote:
> Hi Danna,
> On Jun 2, 2014, at 10:54 AM, Danna bib <danna1364 at gmail.com> wrote:
> > Hello all,
> > I am working with LLVM 3.4. I reserved half of arm registers in order to do some optimization in backend (after register allocation). It works fine with several SPEC2006 benchmarks, but in some of them such as gcc and gobmk, I got the following error.
> > "LLVM ERROR: ran out of registers during register allocation"
> > So, my question is how I can solve that problem?
> Without the input IR, this is hard to tell.
> Could you try to reduce a test case with bugpoint and we can try to help from here.
> The question though is why do you need to reserved so many registers?
> > I would appreciate any advise you may have.
> > regards,
> > Danna
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-commits