Gregory Petrosyan
2010-Jun-05 21:31 UTC
[LLVMdev] JIT "Error: Recursive compilation detected!" when lazily compiling one function at a time
Hello, As the title line says, I'm getting assertions on recursive JIT compiation, like this: opt: JIT.cpp:627: void llvm::JIT::runJITOnFunctionUnlocked(llvm::Function*, const llvm::MutexGuard&): Assertion `!isAlreadyCodeGenerating && "Error: Recursive compilation detected!"' failed. 0 libLLVM-2.7.so 0x012eb2c8 Stack dump: 0. Program arguments: opt -load=/home/gregory/thesis/llvm/Release/lib/LLVMmergebb.so -mergebb -stats bullet.linked.bc -o bullet.linked.bc.opt 1. Running pass 'Merge similar basic blocks' on module 'bullet.linked.bc'. 2. Running pass 'X86 Machine Code Emitter' on function '@_ZN35btSequentialImpulseConstraintSolver28solveGroupCacheFriendlySetupEPP17btCollisionObjectiPP20btPersistentManifoldiPP17btTypedConstraintiRK19btContactSolverInfoP12btIDebugDrawP12btStackAlloc' This is very strange, since I am compiling in one thread, one function at a time, and using lazy JIT compilation. To me, that sound like recursive JIT compilation should be impossible, but, nevertheless, this assertion triggers! Can anybody please help me with it? Gregory