Hi there, I think I've found a bug in the x86 JIT. I get an assertion failure when using thread-local variables and the fast emitter. It only happens with the JIT, the fast emiiter and thread-locals. (The IR passes the verifier) Here's the failure: X86CodeEmitter.cpp:516: void<unnamed>::Emitter::emitInstruction(const llvm::MachineInstr&, const llvm::TargetInstrDesc*): Assertion `0 && "psuedo instructions should be removed before code emission"' failed. There is a problem with submitting a bug-report, however. Since llc has no trouble with thread-locals, I cannot actually generate the assertion failure, without my compiler-generator. I can dump out the IR, but it is rather large. So, Is there a way to get llc to use the same emitter as the JIT, so that I can produce a reasonably sized test-case. I tried the -fast flag, but it compiles correctly. Cheers, Mark.
Mark Shannon wrote:> So, > Is there a way to get llc to use the same emitter as the JIT, so that I > can produce a reasonably sized test-case. > > I tried the -fast flag, but it compiles correctly.Did you try using lli instead of llc?
Hi Mark, Can't we run "lli -fast" on your .bc file instead of llc? Nicolas Mark Shannon wrote:> Hi there, > > I think I've found a bug in the x86 JIT. I get an assertion failure when > using thread-local variables and the fast emitter. > It only happens with the JIT, the fast emiiter and thread-locals. > (The IR passes the verifier) > > Here's the failure: > > X86CodeEmitter.cpp:516: void<unnamed>::Emitter::emitInstruction(const > llvm::MachineInstr&, const llvm::TargetInstrDesc*): Assertion `0 && > "psuedo instructions should be removed before code emission"' failed. > > There is a problem with submitting a bug-report, however. > Since llc has no trouble with thread-locals, I cannot actually generate > the assertion failure, without my compiler-generator. > I can dump out the IR, but it is rather large. > > So, > Is there a way to get llc to use the same emitter as the JIT, so that I > can produce a reasonably sized test-case. > > I tried the -fast flag, but it compiles correctly. > > Cheers, > Mark. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >
Nicolas, Frits, I can't run lli directly, because there is no 'main' in my .bc file, but I should be able to construct a test case. Thanks, Mark Nicolas Geoffray wrote:> Hi Mark, > > Can't we run "lli -fast" on your .bc file instead of llc? > > NicolasFrits van Bommel wrote: > > Did you try using lli instead of llc?
X86 JIT does not yet support TLS. Evan On Jun 12, 2009, at 2:48 AM, Mark Shannon wrote:> Hi there, > > I think I've found a bug in the x86 JIT. I get an assertion failure > when > using thread-local variables and the fast emitter. > It only happens with the JIT, the fast emiiter and thread-locals. > (The IR passes the verifier) > > Here's the failure: > > X86CodeEmitter.cpp:516: void<unnamed>::Emitter::emitInstruction(const > llvm::MachineInstr&, const llvm::TargetInstrDesc*): Assertion `0 && > "psuedo instructions should be removed before code emission"' failed. > > There is a problem with submitting a bug-report, however. > Since llc has no trouble with thread-locals, I cannot actually > generate > the assertion failure, without my compiler-generator. > I can dump out the IR, but it is rather large. > > So, > Is there a way to get llc to use the same emitter as the JIT, so > that I > can produce a reasonably sized test-case. > > I tried the -fast flag, but it compiles correctly. > > Cheers, > Mark. > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Evan, Any plans to add it any time soon? It would be really appreciated. Evan Cheng wrote:> X86 JIT does not yet support TLS. > > Evan > On Jun 12, 2009, at 2:48 AM, Mark Shannon wrote: > >> Hi there, >> >> I think I've found a bug in the x86 JIT. I get an assertion failure >> when >> using thread-local variables and the fast emitter. >> It only happens with the JIT, the fast emiiter and thread-locals. >> (The IR passes the verifier) >> >> Here's the failure: >> >> X86CodeEmitter.cpp:516: void<unnamed>::Emitter::emitInstruction(const >> llvm::MachineInstr&, const llvm::TargetInstrDesc*): Assertion `0 && >> "psuedo instructions should be removed before code emission"' failed. >> >> There is a problem with submitting a bug-report, however. >> Since llc has no trouble with thread-locals, I cannot actually >> generate >> the assertion failure, without my compiler-generator. >> I can dump out the IR, but it is rather large. >> >> So, >> Is there a way to get llc to use the same emitter as the JIT, so >> that I >> can produce a reasonably sized test-case. >> >> I tried the -fast flag, but it compiles correctly. >> >> Cheers, >> Mark. >> _______________________________________________ >> LLVM Developers mailing list >> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu >> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev > > _______________________________________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev >