diff options
author | Ilmir Usmanov <i.usmanov@samsung.com> | 2013-11-08 13:04:32 +0000 |
---|---|---|
committer | Ilmir Usmanov <i.usmanov@samsung.com> | 2013-11-08 13:04:32 +0000 |
commit | 9e716064afbcd2b4c066df3570cc742ddda0ae9a (patch) | |
tree | e7b66c8b8b84c0e73d343128bdae64dc5de3dba9 | |
parent | 46dad21a5fb5ec9b5fbc38c45b84c0ad902094c8 (diff) |
08-11-2013 Ilmir Usmanov <i.usmanov@samsung.com>
Replace is_pointer with POINTER_TYPE_P
* gcc/oacc-low.c: Likewise
git-svn-id: https://gcc.gnu.org/svn/gcc/branches/openacc-1_0-branch@204567 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | ChangeLog.ACC | 5 | ||||
-rw-r--r-- | gcc/oacc-low.c | 14 |
2 files changed, 9 insertions, 10 deletions
diff --git a/ChangeLog.ACC b/ChangeLog.ACC index 4a39a8d7567..b4a5d88ced6 100644 --- a/ChangeLog.ACC +++ b/ChangeLog.ACC @@ -1,3 +1,8 @@ +08-11-2013 Ilmir Usmanov <i.usmanov@samsung.com> + Replace is_pointer with POINTER_TYPE_P + + * gcc/oacc-low.c: Likewise + 08-11-2013 Dmitry Bocharnikov <dmitry.b@samsung.com> Fix formatting. diff --git a/gcc/oacc-low.c b/gcc/oacc-low.c index ad3fcb78015..46c9219c679 100644 --- a/gcc/oacc-low.c +++ b/gcc/oacc-low.c @@ -436,12 +436,6 @@ add_host_version(gimple_stmt_iterator *gsi, gimple_seq orig) gsi_insert_seq_after(gsi, orig, GSI_CONTINUE_LINKING); } -static bool -is_pointer(tree arg) -{ - return TREE_CODE(TREE_TYPE(arg)) == POINTER_TYPE; -} - /* When there is assignment like D.1988 = a.1 + D.1987 where a.1 id pointer * we have to add one assignment before the statement: * D.1988 = a.1; @@ -466,7 +460,7 @@ add_assingments_to_ptrs (gimple_seq *seq, oacc_context* ctx) if (is_gimple_assign (inner_stmt)) { tree rhs = gimple_assign_rhs1 (inner_stmt); - if (is_pointer(rhs)) + if (POINTER_TYPE_P(TREE_TYPE(rhs))) { tree lhs = gimple_assign_lhs (inner_stmt); tree op = gimple_assign_rhs2 (inner_stmt); @@ -678,7 +672,7 @@ gather_oacc_fn_args(splay_tree_node node, void* data) { vec<tree>* pargs = (vec<tree>*)data; tree arg = (tree)node->key; - if(!is_gimple_reg(arg) || is_pointer(arg)) + if(!is_gimple_reg(arg) || POINTER_TYPE_P(TREE_TYPE(arg))) pargs->quick_push(arg); else node->value = (splay_tree_value)NULL_TREE; @@ -732,10 +726,10 @@ gather_oacc_fn_locals(splay_tree_node node, void* data) { splay_tree* local_map = (splay_tree*)data; tree arg = (tree)node->key; - if(is_gimple_reg(arg) && !is_pointer (arg)) + if(is_gimple_reg(arg) && !POINTER_TYPE_P(TREE_TYPE(arg))) generate_local_reg (local_map, arg); /* We need to add value to the map, since then we use it in assignment. */ - if(is_pointer (arg)) + if(POINTER_TYPE_P(TREE_TYPE(arg))) generate_local_reg (local_map, (tree)node->value); return 0; } |