Mercurial > hg > CbC > CbC_gcc
comparison gcc/hsa-common.h @ 131:84e7813d76e9
gcc-8.2
author | mir3636 |
---|---|
date | Thu, 25 Oct 2018 07:37:49 +0900 |
parents | 04ced10e8804 |
children | 1830386684a0 |
comparison
equal
deleted
inserted
replaced
111:04ced10e8804 | 131:84e7813d76e9 |
---|---|
1 /* HSAIL and BRIG related macros and definitions. | 1 /* HSAIL and BRIG related macros and definitions. |
2 Copyright (C) 2013-2017 Free Software Foundation, Inc. | 2 Copyright (C) 2013-2018 Free Software Foundation, Inc. |
3 | 3 |
4 This file is part of GCC. | 4 This file is part of GCC. |
5 | 5 |
6 GCC is free software; you can redistribute it and/or modify | 6 GCC is free software; you can redistribute it and/or modify |
7 it under the terms of the GNU General Public License as published by | 7 it under the terms of the GNU General Public License as published by |
1206 bool m_modified_cfg; | 1206 bool m_modified_cfg; |
1207 }; | 1207 }; |
1208 | 1208 |
1209 enum hsa_function_kind | 1209 enum hsa_function_kind |
1210 { | 1210 { |
1211 HSA_NONE, | 1211 HSA_INVALID, |
1212 HSA_KERNEL, | 1212 HSA_KERNEL, |
1213 HSA_FUNCTION | 1213 HSA_FUNCTION |
1214 }; | 1214 }; |
1215 | 1215 |
1216 struct hsa_function_summary | 1216 struct hsa_function_summary |
1232 /* True if the function is a gridified kernel. */ | 1232 /* True if the function is a gridified kernel. */ |
1233 bool m_gridified_kernel_p; | 1233 bool m_gridified_kernel_p; |
1234 }; | 1234 }; |
1235 | 1235 |
1236 inline | 1236 inline |
1237 hsa_function_summary::hsa_function_summary (): m_kind (HSA_NONE), | 1237 hsa_function_summary::hsa_function_summary (): m_kind (HSA_INVALID), |
1238 m_bound_function (NULL), m_gpu_implementation_p (false) | 1238 m_bound_function (NULL), m_gpu_implementation_p (false) |
1239 { | 1239 { |
1240 } | 1240 } |
1241 | 1241 |
1242 /* Function summary for HSA functions. */ | 1242 /* Function summary for HSA functions. */ |
1243 class hsa_summary_t: public function_summary <hsa_function_summary *> | 1243 class hsa_summary_t: public function_summary <hsa_function_summary *> |
1244 { | 1244 { |
1245 public: | 1245 public: |
1246 hsa_summary_t (symbol_table *table): | 1246 hsa_summary_t (symbol_table *table): |
1247 function_summary<hsa_function_summary *> (table) { } | 1247 function_summary<hsa_function_summary *> (table) |
1248 { | |
1249 disable_insertion_hook (); | |
1250 } | |
1248 | 1251 |
1249 /* Couple GPU and HOST as gpu-specific and host-specific implementation of | 1252 /* Couple GPU and HOST as gpu-specific and host-specific implementation of |
1250 the same function. KIND determines whether GPU is a host-invokable kernel | 1253 the same function. KIND determines whether GPU is a host-invokable kernel |
1251 or gpu-callable function and GRIDIFIED_KERNEL_P is set if the function was | 1254 or gpu-callable function and GRIDIFIED_KERNEL_P is set if the function was |
1252 gridified in OMP. */ | 1255 gridified in OMP. */ |
1406 { | 1409 { |
1407 if (hsa_summaries == NULL) | 1410 if (hsa_summaries == NULL) |
1408 return false; | 1411 return false; |
1409 | 1412 |
1410 hsa_function_summary *s = hsa_summaries->get (cgraph_node::get_create (decl)); | 1413 hsa_function_summary *s = hsa_summaries->get (cgraph_node::get_create (decl)); |
1411 | 1414 return s != NULL && s->m_gpu_implementation_p; |
1412 return s->m_gpu_implementation_p; | |
1413 } | 1415 } |
1414 | 1416 |
1415 #endif /* HSA_H */ | 1417 #endif /* HSA_H */ |