Calling between modules

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Calling between modules

Aaron Aaron
Hello,

I am fairly new to LLVM development.  Currently I am trying to treat LLVM modules almost like ".o" files in a "normal" development environment, and then calling functions in one module from another module.  Is this possible?

Basically, I want self contained chunks of code with dependencies on functions in other self contained chunks that get resolved at JIT time.  I figured since the ExecutionEngine has an "addModuleProvider" function, this sort of behavior is supported.  If not, what is addModuleProvider's intended use?

When I can get LLVM to do what I want, it is truly incredible!  Thanks for a great project!

Aaron



_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
Reply | Threaded
Open this post in threaded view
|

Re: Calling between modules

Bill Wendling
Hi!

> I am fairly new to LLVM development.

Welcome!

> Currently I am trying to treat LLVM modules almost like ".o" files  
> in a "normal" development environment, and then calling functions  
> in one module from another module.  Is this possible?
>
Yes! In fact, that's close to what modules are in LLVM. If you want  
to call a function outside of a .o file, then you have an external  
declaration of that function in the module, and then call it like  
normal. You link the .o files like normal to create the final  
executable.

> Basically, I want self contained chunks of code with dependencies  
> on functions in other self contained chunks that get resolved at  
> JIT time.  I figured since the ExecutionEngine has an  
> "addModuleProvider" function, this sort of behavior is supported.  
> If not, what is addModuleProvider's intended use?
>
> When I can get LLVM to do what I want, it is truly incredible!  
> Thanks for a great project!
>
> Aaron
>
>
> _______________________________________________
> LLVM Developers mailing list
> [hidden email]         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev

_______________________________________________
LLVM Developers mailing list
[hidden email]         http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev