We have a case where LLVM IR may have 2 targets mixed together. Lets call it host and device. Assuming that compiling once for host and once for device is stupid and it should never happen. Can anyone see a way to make Modules switch target contexts on the fly per function or - Adding a pass that splits the modules and then another pass which rejoins them before emitting the final foo.o|s ----------- Crazy thoughts or recommendations? Thanks
FWIW, the required module split seems to have something common with "fat IRs" design recently discussed here: http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066290.html 2013/10/11 "C. Bergström" <cbergstrom at pathscale.com>> > We have a case where LLVM IR may have 2 targets mixed together. Lets call > it host and device. Assuming that compiling once for host and once for > device is stupid and it should never happen. Can anyone see a way to make > Modules switch target contexts on the fly per function or - Adding a pass > that splits the modules and then another pass which rejoins them before > emitting the final foo.o|s > ----------- > Crazy thoughts or recommendations? > > Thanks > ______________________________**_________________ > LLVM Developers mailing list > LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu > http://lists.cs.uiuc.edu/**mailman/listinfo/llvmdev<http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev> >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131011/ef979953/attachment.html>
On 10/11/13 10:58 PM, Dmitry Mikushin wrote:> FWIW, the required module split seems to have something common with > "fat IRs" design recently discussed here: > http://lists.cs.uiuc.edu/pipermail/llvmdev/2013-October/066290.htmlDo you see a way for us to (ab)use this beyond subtargets? The device target may not have much or anything in common with the host target
Maybe Matching Threads
- [LLVMdev] Mixing multiple targets in llvm IR
- [LLVMdev] Supporting heterogeneous computing in llvm.
- [LLVMdev] [cfe-dev] RFC: A proposal to move toward using C++11 features in LLVM & Clang / bounding support for old host compilers
- [LLVMdev] [cfe-dev] RFC: A proposal to move toward using C++11 features in LLVM & Clang / bounding support for old host compilers
- [LLVMdev] Supporting heterogeneous computing in llvm.