Yaron Keren
2013-Oct-22 15:12 UTC
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
I'm running in MCJIT a module generated from one C++ function. Every line of the source function uses C++ classes and may throw an exception. As long as there are less than (about) 1000 lines, everything works. With more lines the compiled code crashes when running it, with no sensible stack trace. Is there any kind of hard-coded size limitation in MCJIT / ELF Dynamic Linker / ELF codegen / number of EH states in a function ? I did browse the code but could not find anything obvious. Yaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131022/0fdbd30f/attachment.html>
Kaylor, Andrew
2013-Oct-22 16:44 UTC
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
I'm not aware of such a limitation. What architecture, code model and relocation model are you using? Are you using the SectionMemoryManager? -Andy From: Yaron Keren [mailto:yaron.keren at gmail.com] Sent: Tuesday, October 22, 2013 8:12 AM To: <llvmdev at cs.uiuc.edu>; Kaylor, Andrew Subject: Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen? I'm running in MCJIT a module generated from one C++ function. Every line of the source function uses C++ classes and may throw an exception. As long as there are less than (about) 1000 lines, everything works. With more lines the compiled code crashes when running it, with no sensible stack trace. Is there any kind of hard-coded size limitation in MCJIT / ELF Dynamic Linker / ELF codegen / number of EH states in a function ? I did browse the code but could not find anything obvious. Yaron -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131022/6e6395c9/attachment.html>
Yaron Keren
2013-Oct-22 17:16 UTC
[LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
OS is Windows 7 64 bit OS, compiler is 32 bit Visual C++ 2012 with 32 bit. The target which is i686-pc-mingw32-elf so I can use the ELF dynamic loader. Code model, relocation model and and memory manager are whatever default for this - did not modify. The Module comes from clang. The source is 1000 or more lines repeating C++ code in one big function: A+1; A*B.t(); where A and B are matrices from Armadillo http://arma.sourceforge.net/. This a stress and performance test due to the large number of EH and temporary objects created. I am using the Engine Builder and MCJIT unmodified (except the multi-modules patches which are not relevant as there is only one module) like this: OwningPtr<llvm::ExecutionEngine> EE(llvm::EngineBuilder(M) .setErrorStr(&Error) .setUseMCJIT(true) .create()); to run the function either llvm::Function *F = M->getFunction(Name); void *FN = EE->getPointerToFunction(F); or uint64_t FN = EE->getFunctionAddress(Name); followed by ((void (*)())FN)(); or EE->runFunction(F, std::vector<llvm::GenericValue>()); all work the same with smaller about 1000 lines of the above code module and crash the same with more code. The call stack is unhelpful Visual C++ says: Frames below may be incorrect and/or missing which indicates a real problem with it. I have tried to provide less stack space (default is 10M) for the compiled program without any change. Yaron 2013/10/22 Kaylor, Andrew <andrew.kaylor at intel.com>> I’m not aware of such a limitation.**** > > ** ** > > What architecture, code model and relocation model are you using? Are you > using the SectionMemoryManager?**** > > ** ** > > -Andy**** > > ** ** > > *From:* Yaron Keren [mailto:yaron.keren at gmail.com] > *Sent:* Tuesday, October 22, 2013 8:12 AM > *To:* <llvmdev at cs.uiuc.edu>; Kaylor, Andrew > *Subject:* Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?*** > * > > ** ** > > I'm running in MCJIT a module generated from one C++ function. Every line > of the source function uses C++ classes and may throw an exception. As long > as there are less than (about) 1000 lines, everything works. With more > lines the compiled code crashes when running it, with no sensible stack > trace.**** > > ** ** > > Is there any kind of hard-coded size limitation in MCJIT / ELF Dynamic > Linker / ELF codegen / number of EH states in a function ? **** > > ** ** > > I did browse the code but could not find anything obvious. **** > > ** ** > > Yaron**** > > ** ** >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131022/f4d24c2d/attachment.html>
Maybe Matching Threads
- [LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
- [LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
- [LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
- [LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?
- [LLVMdev] Size limitations in MCJIT / ELF Dynamic Linker/ ELF codegen?