[Beignet] [PATCH] GBE: add fastcall support.
Yang, Rong R
rong.r.yang at intel.com
Mon Mar 2 00:34:12 PST 2015
LGTM, thanks.
> -----Original Message-----
> From: Beignet [mailto:beignet-bounces at lists.freedesktop.org] On Behalf Of
> Zhigang Gong
> Sent: Monday, March 2, 2015 15:24
> To: beignet at lists.freedesktop.org
> Cc: Gong, Zhigang
> Subject: [Beignet] [PATCH] 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 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
>
> _______________________________________________
> Beignet mailing list
> Beignet at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/beignet
More information about the Beignet
mailing list