diff mbox

[gomp4,committed] Simplify get_omp_data_i_param

Message ID 563F6CA7.9040101@mentor.com
State New
Headers show

Commit Message

Tom de Vries Nov. 8, 2015, 3:39 p.m. UTC
Hi,

this patch simplifies get_omp_data_i_param by using ssa_default_def.

Committed to gomp-4_0-branch.

Thanks,
- Tom
diff mbox

Patch

Simplify get_omp_data_i_param

2015-11-08  Tom de Vries  <tom@codesourcery.com>

	* tree-parloops.c: Include tree-dfa.h.
	(get_omp_data_i_param): Simplify using ssa_default_def.
---
 gcc/tree-parloops.c | 11 ++---------
 1 file changed, 2 insertions(+), 9 deletions(-)

diff --git a/gcc/tree-parloops.c b/gcc/tree-parloops.c
index b4039ad..1551eec 100644
--- a/gcc/tree-parloops.c
+++ b/gcc/tree-parloops.c
@@ -55,6 +55,7 @@  along with GCC; see the file COPYING3.  If not see
 #include "params-enum.h"
 #include "tree-ssa-alias.h"
 #include "tree-eh.h"
+#include "tree-dfa.h"
 
 /* This pass tries to distribute iterations of loops into several threads.
    The implementation is straightforward -- for each loop we test whether its
@@ -2607,15 +2608,7 @@  get_omp_data_i_param (void)
 {
   tree decl = DECL_ARGUMENTS (cfun->decl);
   gcc_assert (DECL_CHAIN (decl) == NULL_TREE);
-  for (unsigned int i = 0; i < num_ssa_names; ++i)
-    {
-      tree name = ssa_name (i);
-      if (name != NULL_TREE
-	  && SSA_NAME_VAR (name) == decl)
-	return name;
-    }
-
-  gcc_unreachable ();
+  return ssa_default_def (cfun, decl);
 }
 
 /* Try to initialize REDUCTION_LIST for code generation part.
-- 
1.9.1