summaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authorZhigang Gong <zhigang.gong@intel.com>2015-03-02 15:20:25 +0800
committerZhigang Gong <zhigang.gong@intel.com>2015-03-02 15:57:05 +0800
commit04510a867f2866ed8e3238deadc6aca193960f52 (patch)
tree599c668ff12dbd6e27dd86f4236662b05e55a3f0 /backend
parentec7b27cc18be4704ba25562a41e2f01ac12e9621 (diff)
GBE: add fastcall support.
I found some optimization pass may add fastcall attribute to some builtin functions. We need to add the corresponding support. Signed-off-by: Zhigang Gong <zhigang.gong@intel.com> Reviewed-by: "Yang, Rong R" <rong.r.yang@intel.com>
Diffstat (limited to 'backend')
-rw-r--r--backend/src/llvm/llvm_gen_backend.cpp4
-rw-r--r--backend/src/llvm/llvm_printf_parser.cpp1
-rw-r--r--backend/src/llvm/llvm_scalarize.cpp4
3 files changed, 7 insertions, 2 deletions
diff --git a/backend/src/llvm/llvm_gen_backend.cpp b/backend/src/llvm/llvm_gen_backend.cpp
index 4080c58c..813d0d31 100644
--- a/backend/src/llvm/llvm_gen_backend.cpp
+++ b/backend/src/llvm/llvm_gen_backend.cpp
@@ -2021,9 +2021,11 @@ namespace gbe
case CallingConv::PTX_Kernel:
#else
case CallingConv::C:
+ case CallingConv::Fast:
#endif
break;
- default: GBE_ASSERTM(false, "Unsupported calling convention");
+ default:
+ GBE_ASSERTM(false, "Unsupported calling convention");
}
ctx.startFunction(F.getName());
diff --git a/backend/src/llvm/llvm_printf_parser.cpp b/backend/src/llvm/llvm_printf_parser.cpp
index 52da2e50..8e662b37 100644
--- a/backend/src/llvm/llvm_printf_parser.cpp
+++ b/backend/src/llvm/llvm_printf_parser.cpp
@@ -564,6 +564,7 @@ error:
case CallingConv::PTX_Kernel:
#else
case CallingConv::C:
+ case CallingConv::Fast:
#endif
break;
default:
diff --git a/backend/src/llvm/llvm_scalarize.cpp b/backend/src/llvm/llvm_scalarize.cpp
index cf2939dc..860053fa 100644
--- a/backend/src/llvm/llvm_scalarize.cpp
+++ b/backend/src/llvm/llvm_scalarize.cpp
@@ -764,9 +764,11 @@ namespace gbe {
case CallingConv::PTX_Kernel:
#else
case CallingConv::C:
+ case CallingConv::Fast:
#endif
break;
- default: GBE_ASSERTM(false, "Unsupported calling convention");
+ default:
+ GBE_ASSERTM(false, "Unsupported calling convention");
}
// As we inline all function calls, so skip non-kernel functions