From 69a71a6d071a5eae8a06282351e53d8c383aba9a Mon Sep 17 00:00:00 2001 From: Martin Jambor Date: Fri, 2 Dec 2016 15:42:15 +0100 Subject: [PATCH] [hsa] Exclude parallel outlines from hsa_callable_functions_p 2016-12-09 Martin Jambor * hsa.c (hsa_callable_function_p): Return false for artificial functions. From-SVN: r243184 --- gcc/ChangeLog | 5 +++++ gcc/hsa.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 92501fc213c..0880c8408d4 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2016-12-09 Martin Jambor + + * hsa.c (hsa_callable_function_p): Return false for artificial + functions. + 2016-12-02 James Greenhalgh PR rtl-optimization/78561 diff --git a/gcc/hsa.c b/gcc/hsa.c index f881e781742..31e3252f2fb 100644 --- a/gcc/hsa.c +++ b/gcc/hsa.c @@ -90,7 +90,10 @@ bool hsa_callable_function_p (tree fndecl) { return (lookup_attribute ("omp declare target", DECL_ATTRIBUTES (fndecl)) - && !lookup_attribute ("oacc function", DECL_ATTRIBUTES (fndecl))); + && !lookup_attribute ("oacc function", DECL_ATTRIBUTES (fndecl)) + /* At this point, this is enough to identify clones for + parallel, which for HSA would need to be kernels anyway. */ + && !DECL_ARTIFICIAL (fndecl)); } /* Allocate HSA structures that are are used when dealing with different -- 2.30.2