[LLVMdev] another experimental patch for bug 2606

Garrison Venn gvenn.cfe.dev at gmail.com
Sat Feb 27 02:25:19 PST 2010

No problem I'll drop this from our discussion as it really is only germane to my
learning path and imagination. :-) I do at this time still have this concern of
allowing a user (developer) the right to turn this "cross module linkage" off, but
I'm still in the process of understanding your previous comments on this.

Thanks again for the help and time by the way.


PS: I'm still studying your last detailed comments to thread:
"2nd attempt for a working patch for bug 2606". I'll keep 
that one alive.
On Feb 26, 2010, at 21:23, Jeffrey Yasskin wrote:

> FWIW, I don't like the idea of adding a new JIT class to support
> linking. I think you can do it without this.
> On Fri, Feb 26, 2010 at 5:44 PM, Garrison Venn <gvenn.cfe.dev at gmail.com> wrote:
>> Hey all,
>> Attached you will find an experimental patch which allows me to play with a
>> derived JIT class. With this patch
>> I've alleviated my concerns with forcing cross module behavior for all users
>> of JIT. However this introduces some
>> new semantics, and kind of circumvents the EngineBuilder API. More important
>> though, I have not addressed
>> any concern about using stub functions in eager compilation mode. I don't
>> yet understand this concern since
>> these stubs are compile time only, and it seems that the pending function
>> system inherently uses stubs. Anyway
>> I'm sure my understanding will get fixed soon enough. :-) The new code is
>> NOT commented.
>> This patch was NOT attached to 2606. Rather I feel this patch
>> is experimental in nature. As before I tried to use "GMV Mod"
>> as comments to mark my modifications as long as they did not
>> involve introducing new files. If one is interested and wants
>> to use this patch, one should use the test cases found in  2606 and modify
>> them in the following ways.
>> 1) Add: #include "llvm/ExecutionEngine/CrossModuleJIT.h"
>> 2) Add the call: LLVMSetupForCrossModuleJITUse();
>> before using the EngineBuilder API
>> For example take:
>> ExecutionEngine* EE = EngineBuilder(M).create();
>> and turn it into:
>> LLVMSetupForCrossModuleJITUse();
>> ExecutionEngine* EE = EngineBuilder(M).create();
>> I wrote this somewhat fast so caveat emptor.
>> Garrison

More information about the llvm-dev mailing list