Enable PTX backend

This commit is contained in:
Siu Kwan Lam 2012-08-14 15:05:22 -07:00
commit f85713a736
7 changed files with 176 additions and 20 deletions

View file

@ -2143,5 +2143,12 @@ def inline_function(call):
#===----------------------------------------------------------------------===
if _core.LLVMInitializeNativeTarget():
raise llvm.LLVMException("No native target!?")
if _core.LLVMInitializeNativeTargetAsmPrinter():
# should this be an optional feature?
# should user trigger the initialization?
raise llvm.LLVMException("No native asm printer!?")
if True: # use PTX
_core.LLVMInitializePTXTarget()
_core.LLVMInitializePTXTargetInfo()
_core.LLVMInitializePTXAsmPrinter()