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 -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100226/87fda390/attachment.html> -------------- next part -------------- A non-text attachment was scrubbed... Name: PR2606.experimental.patch Type: application/octet-stream Size: 11233 bytes Desc: not available URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100226/87fda390/attachment.obj> -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100226/87fda390/attachment-0001.html>
Eek! I'm going to lose track of the threads if you start a new one every time you update the patch. Consider using http://codereview.appspot.com/? 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 > > >
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 > > >
Will do Garrison On Feb 26, 2010, at 21:18, Jeffrey Yasskin wrote:> Eek! I'm going to lose track of the threads if you start a new one > every time you update the patch. Consider using > http://codereview.appspot.com/? > > 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 >> >> >>
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. Garrison 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 >> >> >>
Seemingly Similar Threads
- [LLVMdev] another experimental patch for bug 2606
- [LLVMdev] another experimental patch for bug 2606
- [LLVMdev] another experimental patch for bug 2606
- [LLVMdev] 2nd attempt for a working patch for bug 2606
- [LLVMdev] 2nd attempt for a working patch for bug 2606