* [HSA] Fix emission of internal functions
@ 2015-12-04 13:42 Martin Liška
0 siblings, 0 replies; only message in thread
From: Martin Liška @ 2015-12-04 13:42 UTC (permalink / raw)
To: GCC Patches
[-- Attachment #1: Type: text/plain, Size: 180 bytes --]
Hello.
Following patch handles just floating pointer internal functions and
for the rest if displays warning message.
Patch has been installed to the HSA branch.
Thanks,
Martin
[-- Attachment #2: 0001-HSA-fix-emission-of-non-math-internal-functions.patch --]
[-- Type: text/x-patch, Size: 1501 bytes --]
From 5c6581d913c754e4e0a197e073bfa3c17c20b31f Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Fri, 4 Dec 2015 09:56:11 +0100
Subject: [PATCH 1/3] HSA: fix emission of non-math internal functions
gcc/ChangeLog:
2015-12-04 Martin Liska <mliska@suse.cz>
* hsa-gen.c (gen_hsa_insn_for_internal_fn_call): Explicitly
enumerate all internal functions that can be emitted as function
call instruction.
---
gcc/hsa-gen.c | 28 +++++++++++++++++++++++++++-
1 file changed, 27 insertions(+), 1 deletion(-)
diff --git a/gcc/hsa-gen.c b/gcc/hsa-gen.c
index 3fbafb5..85ba148 100644
--- a/gcc/hsa-gen.c
+++ b/gcc/hsa-gen.c
@@ -4974,8 +4974,34 @@ gen_hsa_insn_for_internal_fn_call (gcall *stmt, hsa_bb *hbb)
gen_hsa_popcount (stmt, hbb);
break;
- default:
+ case IFN_ACOS:
+ case IFN_ASIN:
+ case IFN_ATAN:
+ case IFN_EXP:
+ case IFN_EXP10:
+ case IFN_EXPM1:
+ case IFN_LOG:
+ case IFN_LOG10:
+ case IFN_LOG1P:
+ case IFN_LOGB:
+ case IFN_SIGNIFICAND:
+ case IFN_TAN:
+ case IFN_NEARBYINT:
+ case IFN_ROUND:
+ case IFN_ATAN2:
+ case IFN_COPYSIGN:
+ case IFN_FMOD:
+ case IFN_POW:
+ case IFN_REMAINDER:
+ case IFN_SCALB:
+ case IFN_FMIN:
+ case IFN_FMAX:
gen_hsa_insns_for_call_of_internal_fn (stmt, hbb);
+
+ default:
+ HSA_SORRY_ATV (gimple_location (stmt),
+ "support for HSA does not implement internal function: %s",
+ internal_fn_name (fn));
break;
}
}
--
2.6.3
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-12-04 13:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-04 13:42 [HSA] Fix emission of internal functions Martin Liška
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).