[LLVMdev] BranchInst problem
Chris Lattner
sabre at nondot.org
Wed Jun 9 01:13:01 PDT 2004
On Wed, 9 Jun 2004, Vladimir Prus wrote:
> Chris Lattner wrote:
> > > Thanks, this works! I don't yet understand why spill code is needed there
> > > at all, but I'll return to that when I have branches working correctly.
> >
> > I'm not sure either. Can you send the code before and after register
> > allocation?
>
> Attached.
Okay, yeah the spill code looks right. The local allocator can't keep
virtual registers in physical registers across basic blocks. As such, the
vregs are spilled at the end of the entry block and then reloaded in the
blocks they are used.
> > You might also try -regalloc=linearscan, as the default
> > allocator is, uhhh, non-optimal.
>
> Ehm.... I get this:
>
> llc: LiveIntervals.cpp:166: virtual bool
> llvm::LiveIntervals::runOnMachineFunction(llvm::MachineFunction&): Assertion
> `r2iit != r2iMap_.end()' failed.
Hrm, that's obviously really bad. Can you send me (offline) the output of
llc with the -debug option set and with this code before the assert:
std::cerr << "MI: " << i << " " << reg << " "; mii->dump();
Also note that it looks like your tree is a bit out of date. You might
try updating and see if it helps the problem.
-Chris
--
http://llvm.cs.uiuc.edu/
http://www.nondot.org/~sabre/Projects/
More information about the llvm-dev
mailing list