Hello Everyone,
   This patch is for the Cilkplus branch affecting both C and C++ compilers. 
This patch will change the parameter from cgraph_node * to tree of type 
function declaration.

Thanks,

Balaji V. Iyer. 
diff --git a/gcc/ChangeLog.cilk b/gcc/ChangeLog.cilk
index 6078abf..8627920 100644
--- a/gcc/ChangeLog.cilk
+++ b/gcc/ChangeLog.cilk
@@ -1,3 +1,9 @@
+2012-04-16  Balaji V. Iyer  <balaji.v.i...@intel.com>
+
+       * elem-function.c (is_elem_fn): Changed the parameter type from a
+       cgraph_node to tree of type function decl.
+       (create_elem_vec_fn): Likewise.
+
 2012-04-14  Balaji V. Iyer  <balaji.v.i...@intel.com>
 
        * cgraphunit.c (cgraph_add_new_function): Replaced cgraph_create_node
diff --git a/gcc/elem-function.c b/gcc/elem-function.c
index 328e05e..4cc9035 100644
--- a/gcc/elem-function.c
+++ b/gcc/elem-function.c
@@ -109,13 +109,10 @@ rename_elem_fn (tree decl, const char *suffix)
 /* this function will check to see if the node is part of an function that
  * needs to be converted to its vector equivalent. */
 static bool
-is_elem_fn (struct cgraph_node *node)
+is_elem_fn (tree fndecl)
 {
-  tree fndecl, ii_tree;
-  if (!node)
-    return false;
+  tree ii_tree;
 
-  fndecl = node->symbol.decl;
   for (ii_tree = DECL_ATTRIBUTES (fndecl); ii_tree;
        ii_tree = TREE_CHAIN (ii_tree))
     {
@@ -562,7 +559,7 @@ create_elem_vec_fn (void)
   for (ii_node = cgraph_nodes; ii_node != NULL; ii_node = ii_node->next)
     {
       tree node_decl = ii_node->symbol.decl;
-      if (is_elem_fn (ii_node)
+      if (is_elem_fn (node_decl)
          && DECL_STRUCT_FUNCTION (node_decl) 
          && !DECL_STRUCT_FUNCTION (node_decl)->elem_fn_already_cloned)
        {

Reply via email to