[LLVMdev] UNREACHABLE executed at MCJIT.cpp:322!

edA-qa mort-ora-y eda-qa at disemia.com
Fri Nov 8 03:16:03 PST 2013


That makes it more mysterious then since I am indeed only calling a main
function.  Perhaps I have to invoke it a different way. Here's my call I
have now:

	auto main = linker->getModule()->getFunction( "main" );

	std::vector<llvm::GenericValue> args(2);
	args[0].IntVal = llvm::APInt( platform::abi_int_size, 0 );
	args[1].PointerVal = nullptr;
	llvm::GenericValue gv = ee->runFunction( main, args );



On 08/11/13 11:14, Yaron Keren wrote:
> MCJIT::runFunction supports only main-style argument passing but not
> other cases like the JIT.
> These types of arguments will work:
> 
> (int, char**, char**)
> (int, char**)
> (int)
> (void)
> 
> The general case is not supported since it requires creating a small
> stub function, compiling and running it on the fly, supported by JIT but
> not MCJIT.
> 
> However, with the supported calling sequences, you can probably replace
> the char** with a void* to a structure so that practically anything can
> be passed to your function inside the structure.
> 
> Yaron
> 
> 
> 
> 2013/11/8 edA-qa mort-ora-y <eda-qa at disemia.com <mailto:eda-qa at disemia.com>>
> 
>     I'm trying to get MCJIT working but I get the following errors:
>             Full-featured argument passing not supported yet!
>             UNREACHABLE executed at MCJIT.cpp:322!
>     I'm sure the first one will be a problem, but the second one prevents me
>     from testing anything. I don't know how to fix the problem.
> 
>     My code works when using the non-MC JIT, and I added to my
>     EngineBuilder:
>             .setUseMCJIT(true)
> 
>     Reading from a tutorial* I also tried finalizing the engine object:
>             ee->finalizeObject()
> 
>     I'd like to get this working since in the release notes for 3.4 it
>     indicates exception handling has been removed from the old JIT. I need
>     exception handling support and would like to get MCJIT working prior to
>     upgrading to 3.4 later.
> 
> 
>     *http://blog.llvm.org/2013/07/using-mcjit-with-kaleidoscope-tutorial.html
> 
>     --
>     edA-qa mort-ora-y
>     -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
>     Sign: Please digitally sign your emails.
>     Encrypt: I'm also happy to receive encrypted mail.
>     _______________________________________________
>     LLVM Developers mailing list
>     LLVMdev at cs.uiuc.edu <mailto:LLVMdev at cs.uiuc.edu>        
>     http://llvm.cs.uiuc.edu
>     http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
> 
> 


-- 
edA-qa mort-ora-y
-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
Sign: Please digitally sign your emails.
Encrypt: I'm also happy to receive encrypted mail.



More information about the llvm-dev mailing list