[Beignet] [PATCH] GBE: add fastcall support.
Zhigang Gong
zhigang.gong at intel.com
Sun Mar 1 23:23:57 PST 2015
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 at intel.com>
---
backend/src/llvm/llvm_gen_backend.cpp | 4 +++-
backend/src/llvm/llvm_printf_parser.cpp | 1 +
backend/src/llvm/llvm_scalarize.cpp | 4 +++-
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 238f572..aad638f 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 52da2e5..8e662b3 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 4df849f..97a7615 100644
--- a/backend/src/llvm/llvm_scalarize.cpp
+++ b/backend/src/llvm/llvm_scalarize.cpp
@@ -788,9 +788,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
--
1.9.1
More information about the Beignet
mailing list