You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING. If not, write to the Free
-Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA. */
+Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
+02110-1301, USA. */
#include "config.h"
#include "system.h"
struct cgraph_edge *edge, last;
struct cgraph_node **stack =
- xcalloc (cgraph_n_nodes, sizeof (struct cgraph_node *));
+ XCNEWVEC (struct cgraph_node *, cgraph_n_nodes);
/* We have to deal with cycles nicely, so use a depth first traversal
output algorithm. Ignore the fact that some functions won't need
}
}
free (stack);
+ for (node = cgraph_nodes; node; node = node->next)
+ node->aux = NULL;
return order_pos;
}
removes unneeded bodies of extern inline functions. */
bool
-cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *dump_file)
+cgraph_remove_unreachable_nodes (bool before_inlining_p, FILE *file)
{
struct cgraph_node *first = (void *) 1;
struct cgraph_node *node;
#ifdef ENABLE_CHECKING
verify_cgraph ();
#endif
- if (dump_file)
- fprintf (dump_file, "\nReclaiming functions:");
+ if (file)
+ fprintf (file, "\nReclaiming functions:");
#ifdef ENABLE_CHECKING
for (node = cgraph_nodes; node; node = node->next)
gcc_assert (!node->aux);
local_insns = node->local.self_insns;
else
local_insns = 0;
- if (dump_file)
- fprintf (dump_file, " %s", cgraph_node_name (node));
+ if (file)
+ fprintf (file, " %s", cgraph_node_name (node));
if (!node->analyzed || !DECL_EXTERNAL (node->decl)
|| before_inlining_p)
cgraph_remove_node (node);
}
for (node = cgraph_nodes; node; node = node->next)
node->aux = NULL;
- if (dump_file)
- fprintf (dump_file, "\nReclaimed %i insns", insns);
+ if (file)
+ fprintf (file, "\nReclaimed %i insns", insns);
return changed;
}