[LLVMdev] VirtRegMap Error
David Greene
dag at cray.com
Thu May 8 11:36:36 PDT 2008
I just updated from upstream llvm as of about last Thursday and I'm
getting a segfault in VirtRegMap::RemoveMachineInstrFromMaps.
It seems that the particular instruction being removed happens
to reference an object at stack slot 4. The first spilled register is
assigned stack slot 6 so LowSpillSlot == 6. Then, when we try to
erase from SpillSlotToUsesMap, we index with a negative number.
The instruction being removed is generated by instruction selection,
so it is part of the original program:
%reg1309<def> = FsMOVLPDrm <fi#4>, 1, %reg0, 0, Mem:LD(8,8) [ZETA + 0]
Since we're hooking up llvm to custom code, I want to check assumptions.
Is there anything in llvm-gcc or the other llvm tools that could generate a
stack slot reference like this before register allocation? Basically, I'm
trying to see if only our code could ever do this. Otherwise, we have a bug
in llvm. Is everything on the stack assumed to be mem2reg'd and so this
never happens with llvm tools?
Thanks.
-Dave
More information about the llvm-dev
mailing list