[LLVMdev] Mixing multiple targets in llvm IR

"C. Bergström" cbergstrom at pathscale.com
Fri Oct 11 08:39:44 PDT 2013


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



More information about the llvm-dev mailing list