[LLVMdev] ARM issue: Trying to add an operand to a machine instr that is already done!

Karel Gardas karel.gardas at centrum.cz
Mon Aug 29 14:33:16 PDT 2011


Hello,

I've compiled today's LLVM on ARM/Linux machine and attempted to use our 
GHC/ARM port (which is using LLVM as a backend for generating machine 
code) with it but I've failed in compiling GHC alone as LLVM fails on me 
with following message:

llc: 
/export/home/karel/vcs/llvm-ghc-arm/lib/CodeGen/MachineInstr.cpp:612: 
void llvm::MachineInstr::addOperand(const llvm::MachineOperand&): 
Assertion `(isImpReg || !OperandsComplete()) && "Trying to add an 
operand to a machine instr that is already done!"' failed.
Stack dump:
0.	Program arguments: llc -O3 -relocation-model=static 
/tmp/ghc12607_0/ghc12607_0.bc -o /tmp/ghc12607_0/ghc12607_0.lm_s 
-mattr=+v7,+vfp3
1.	Running pass 'Function Pass Manager' on module 
'/tmp/ghc12607_0/ghc12607_0.bc'.
2.	Running pass 'ARM load / store optimization pass' on function 
'@s51E_info'
Aborted

FYI: Stephen Blackheath enhanced LLVM to support custom GHC calling 
convention on ARM and I've added support for floating point regs to his 
patch. Current version is attached for your reference. I'm writing this 
since GHC/ARM is working well with LLVM from 2011-07-12 with this patch 
applied but it's not working with today's LLVM. I'm curious if this 
failure is caused by our patch (or some omission in it) or if this is 
issue in LLVM itself.

Thanks for any idea where to start looking to fix that!
Karel
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ghc_llvm.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110829/a2567d4e/attachment.ksh>


More information about the llvm-dev mailing list