OSDN Git Service

* store-motion.c Do not include params.h
[pf3gnuchains/gcc-fork.git] / gcc / cgraph.h
1 /* Callgraph handling code.
2    Copyright (C) 2003, 2004, 2005, 2006, 2007, 2008, 2009
3    Free Software Foundation, Inc.
4    Contributed by Jan Hubicka
5
6 This file is part of GCC.
7
8 GCC is free software; you can redistribute it and/or modify it under
9 the terms of the GNU General Public License as published by the Free
10 Software Foundation; either version 3, or (at your option) any later
11 version.
12
13 GCC is distributed in the hope that it will be useful, but WITHOUT ANY
14 WARRANTY; without even the implied warranty of MERCHANTABILITY or
15 FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
16 for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with GCC; see the file COPYING3.  If not see
20 <http://www.gnu.org/licenses/>.  */
21
22 #ifndef GCC_CGRAPH_H
23 #define GCC_CGRAPH_H
24 #include "tree.h"
25 #include "basic-block.h"
26
27 enum availability
28 {
29   /* Not yet set by cgraph_function_body_availability.  */
30   AVAIL_UNSET,
31   /* Function body/variable initializer is unknown.  */
32   AVAIL_NOT_AVAILABLE,
33   /* Function body/variable initializer is known but might be replaced
34      by a different one from other compilation unit and thus needs to
35      be dealt with a care.  Like AVAIL_NOT_AVAILABLE it can have
36      arbitrary side effects on escaping variables and functions, while
37      like AVAILABLE it might access static variables.  */
38   AVAIL_OVERWRITABLE,
39   /* Function body/variable initializer is known and will be used in final
40      program.  */
41   AVAIL_AVAILABLE,
42   /* Function body/variable initializer is known and all it's uses are explicitly
43      visible within current unit (ie it's address is never taken and it is not
44      exported to other units).
45      Currently used only for functions.  */
46   AVAIL_LOCAL
47 };
48
49 extern const char * const cgraph_availability_names[];
50
51 /* Function inlining information.  */
52
53 struct GTY(()) inline_summary
54 {
55   /* Estimated stack frame consumption by the function.  */
56   HOST_WIDE_INT estimated_self_stack_size;
57
58   /* Size of the function before inlining.  */
59   int self_insns;
60 };
61
62 /* Information about the function collected locally.
63    Available after function is analyzed.  */
64
65 struct GTY(()) cgraph_local_info {
66   struct inline_summary inline_summary;
67
68   /* Set when function function is visible in current compilation unit only
69      and its address is never taken.  */
70   unsigned local : 1;
71
72   /* Set when function is visible by other units.  */
73   unsigned externally_visible : 1;
74
75   /* Set once it has been finalized so we consider it to be output.  */
76   unsigned finalized : 1;
77
78   /* False when there something makes inlining impossible (such as va_arg).  */
79   unsigned inlinable : 1;
80
81   /* True when function should be inlined independently on its size.  */
82   unsigned disregard_inline_limits : 1;
83
84   /* True when the function has been originally extern inline, but it is
85      redefined now.  */
86   unsigned redefined_extern_inline : 1;
87
88   /* True if statics_read_for_function and
89      statics_written_for_function contain valid data.  */
90   unsigned for_functions_valid : 1;
91
92   /* True if the function is going to be emitted in some other translation
93      unit, referenced from vtable.  */
94   unsigned vtable_method : 1;
95 };
96
97 /* Information about the function that needs to be computed globally
98    once compilation is finished.  Available only with -funit-at-a-time.  */
99
100 struct GTY(()) cgraph_global_info {
101   /* Estimated stack frame consumption by the function.  */
102   HOST_WIDE_INT estimated_stack_size;
103   /* Expected offset of the stack frame of inlined function.  */
104   HOST_WIDE_INT stack_frame_offset;
105
106   /* For inline clones this points to the function they will be
107      inlined into.  */
108   struct cgraph_node *inlined_to;
109
110   /* Estimated size of the function after inlining.  */
111   int insns;
112
113   /* Estimated growth after inlining.  INT_MIN if not computed.  */
114   int estimated_growth;
115
116   /* Set iff the function has been inlined at least once.  */
117   bool inlined;
118 };
119
120 /* Information about the function that is propagated by the RTL backend.
121    Available only for functions that has been already assembled.  */
122
123 struct GTY(()) cgraph_rtl_info {
124    unsigned int preferred_incoming_stack_boundary;
125 };
126
127 /* Represent which DECL tree (or reference to such tree)
128    will be replaced by another tree while versioning.  */
129 struct GTY(()) ipa_replace_map
130 {
131   /* The tree that will be replaced.  */
132   tree old_tree;
133   /* The new (replacing) tree.  */
134   tree new_tree;
135   /* True when a substitution should be done, false otherwise.  */
136   bool replace_p;
137   /* True when we replace a reference to old_tree.  */
138   bool ref_p;
139 };
140 typedef struct ipa_replace_map *ipa_replace_map_p;
141 DEF_VEC_P(ipa_replace_map_p);
142 DEF_VEC_ALLOC_P(ipa_replace_map_p,gc);
143
144 struct GTY(()) cgraph_clone_info
145 {
146   VEC(ipa_replace_map_p,gc)* tree_map;
147   bitmap args_to_skip;
148 };
149
150 /* The cgraph data structure.
151    Each function decl has assigned cgraph_node listing callees and callers.  */
152
153 struct GTY((chain_next ("%h.next"), chain_prev ("%h.previous"))) cgraph_node {
154   tree decl;
155   struct cgraph_edge *callees;
156   struct cgraph_edge *callers;
157   struct cgraph_node *next;
158   struct cgraph_node *previous;
159   /* For nested functions points to function the node is nested in.  */
160   struct cgraph_node *origin;
161   /* Points to first nested function, if any.  */
162   struct cgraph_node *nested;
163   /* Pointer to the next function with same origin, if any.  */
164   struct cgraph_node *next_nested;
165   /* Pointer to the next function in cgraph_nodes_queue.  */
166   struct cgraph_node *next_needed;
167   /* Pointer to the next clone.  */
168   struct cgraph_node *next_sibling_clone;
169   struct cgraph_node *prev_sibling_clone;
170   struct cgraph_node *clones;
171   struct cgraph_node *clone_of;
172   /* For functions with many calls sites it holds map from call expression
173      to the edge to speed up cgraph_edge function.  */
174   htab_t GTY((param_is (struct cgraph_edge))) call_site_hash;
175
176   PTR GTY ((skip)) aux;
177
178   struct cgraph_local_info local;
179   struct cgraph_global_info global;
180   struct cgraph_rtl_info rtl;
181   struct cgraph_clone_info clone;
182
183   /* Expected number of executions: calculated in profile.c.  */
184   gcov_type count;
185   /* Unique id of the node.  */
186   int uid;
187   /* Ordering of all cgraph nodes.  */
188   int order;
189
190   /* unique id for profiling. pid is not suitable because of different
191      number of cfg nodes with -fprofile-generate and -fprofile-use */
192   int pid;
193
194   /* Set when function must be output - it is externally visible
195      or its address is taken.  */
196   unsigned needed : 1;
197   /* Set when function has address taken.  */
198   unsigned address_taken : 1;
199   /* Set when decl is an abstract function pointed to by the
200      ABSTRACT_DECL_ORIGIN of a reachable function.  */
201   unsigned abstract_and_needed : 1;
202   /* Set when function is reachable by call from other function
203      that is either reachable or needed.  */
204   unsigned reachable : 1;
205   /* Set once the function is lowered (i.e. its CFG is built).  */
206   unsigned lowered : 1;
207   /* Set once the function has been instantiated and its callee
208      lists created.  */
209   unsigned analyzed : 1;
210   /* Set when function is scheduled to be processed by local passes.  */
211   unsigned process : 1;
212   /* Set for aliases once they got through assemble_alias.  */
213   unsigned alias : 1;
214
215   /* In non-unit-at-a-time mode the function body of inline candidates is saved
216      into clone before compiling so the function in original form can be
217      inlined later.  This pointer points to the clone.  */
218   tree inline_decl;
219 };
220
221 typedef struct cgraph_node *cgraph_node_ptr;
222
223 DEF_VEC_P(cgraph_node_ptr);
224 DEF_VEC_ALLOC_P(cgraph_node_ptr,heap);
225 DEF_VEC_ALLOC_P(cgraph_node_ptr,gc);
226
227 /* A cgraph node set is a collection of cgraph nodes.  A cgraph node
228    can appear in multiple sets.  */
229 struct GTY(()) cgraph_node_set_def
230 {
231   htab_t GTY((param_is (struct cgraph_node_set_element_def))) hashtab;
232   VEC(cgraph_node_ptr, gc) *nodes;
233   PTR GTY ((skip)) aux;
234 };
235
236 typedef struct cgraph_node_set_def *cgraph_node_set;
237
238 DEF_VEC_P(cgraph_node_set);
239 DEF_VEC_ALLOC_P(cgraph_node_set,gc);
240 DEF_VEC_ALLOC_P(cgraph_node_set,heap);
241
242 /* A cgraph node set element contains an index in the vector of nodes in
243    the set.  */
244 struct GTY(()) cgraph_node_set_element_def
245 {
246   struct cgraph_node *node;
247   HOST_WIDE_INT index;
248 };
249
250 typedef struct cgraph_node_set_element_def *cgraph_node_set_element;
251 typedef const struct cgraph_node_set_element_def *const_cgraph_node_set_element;
252
253 /* Iterator structure for cgraph node sets.  */
254 typedef struct
255 {
256   cgraph_node_set set;
257   unsigned index;
258 } cgraph_node_set_iterator;
259
260 #define DEFCIFCODE(code, string)        CIF_ ## code,
261 /* Reasons for inlining failures.  */
262 typedef enum {
263 #include "cif-code.def"
264   CIF_N_REASONS
265 } cgraph_inline_failed_t;
266
267 struct GTY((chain_next ("%h.next_caller"), chain_prev ("%h.prev_caller"))) cgraph_edge {
268   struct cgraph_node *caller;
269   struct cgraph_node *callee;
270   struct cgraph_edge *prev_caller;
271   struct cgraph_edge *next_caller;
272   struct cgraph_edge *prev_callee;
273   struct cgraph_edge *next_callee;
274   gimple call_stmt;
275   PTR GTY ((skip (""))) aux;
276   /* When equal to CIF_OK, inline this call.  Otherwise, points to the
277      explanation why function was not inlined.  */
278   cgraph_inline_failed_t inline_failed;
279   /* Expected number of executions: calculated in profile.c.  */
280   gcov_type count;
281   /* Expected frequency of executions within the function. 
282      When set to CGRAPH_FREQ_BASE, the edge is expected to be called once
283      per function call.  The range is 0 to CGRAPH_FREQ_MAX.  */
284   int frequency;
285   /* Depth of loop nest, 1 means no loop nest.  */
286   unsigned int loop_nest : 30;
287   /* Whether this edge describes a call that was originally indirect.  */
288   unsigned int indirect_call : 1;
289   /* Can this call throw externally?  */
290   unsigned int can_throw_external : 1;
291   /* Unique id of the edge.  */
292   int uid;
293 };
294
295 #define CGRAPH_FREQ_BASE 1000
296 #define CGRAPH_FREQ_MAX 100000
297
298 typedef struct cgraph_edge *cgraph_edge_p;
299
300 DEF_VEC_P(cgraph_edge_p);
301 DEF_VEC_ALLOC_P(cgraph_edge_p,heap);
302
303 /* The varpool data structure.
304    Each static variable decl has assigned varpool_node.  */
305
306 struct GTY((chain_next ("%h.next"))) varpool_node {
307   tree decl;
308   /* Pointer to the next function in varpool_nodes.  */
309   struct varpool_node *next;
310   /* Pointer to the next function in varpool_nodes_queue.  */
311   struct varpool_node *next_needed;
312   /* Ordering of all cgraph nodes.  */
313   int order;
314
315   /* Set when function must be output - it is externally visible
316      or its address is taken.  */
317   unsigned needed : 1;
318   /* Needed variables might become dead by optimization.  This flag
319      forces the variable to be output even if it appears dead otherwise.  */
320   unsigned force_output : 1;
321   /* Set once the variable has been instantiated and its callee
322      lists created.  */
323   unsigned analyzed : 1;
324   /* Set once it has been finalized so we consider it to be output.  */
325   unsigned finalized : 1;
326   /* Set when variable is scheduled to be assembled.  */
327   unsigned output : 1;
328   /* Set when function is visible by other units.  */
329   unsigned externally_visible : 1;
330   /* Set for aliases once they got through assemble_alias.  */
331   unsigned alias : 1;
332 };
333
334 /* Every top level asm statement is put into a cgraph_asm_node.  */
335
336 struct GTY(()) cgraph_asm_node {
337   /* Next asm node.  */
338   struct cgraph_asm_node *next;
339   /* String for this asm node.  */
340   tree asm_str;
341   /* Ordering of all cgraph nodes.  */
342   int order;
343 };
344
345 extern GTY(()) struct cgraph_node *cgraph_nodes;
346 extern GTY(()) int cgraph_n_nodes;
347 extern GTY(()) int cgraph_max_uid;
348 extern GTY(()) int cgraph_edge_max_uid;
349 extern GTY(()) int cgraph_max_pid;
350 extern bool cgraph_global_info_ready;
351 enum cgraph_state
352 {
353   /* Callgraph is being constructed.  It is safe to add new functions.  */
354   CGRAPH_STATE_CONSTRUCTION,
355   /* Callgraph is built and IPA passes are being run.  */
356   CGRAPH_STATE_IPA,
357   /* Callgraph is built and all functions are transformed to SSA form.  */
358   CGRAPH_STATE_IPA_SSA,
359   /* Functions are now ordered and being passed to RTL expanders.  */
360   CGRAPH_STATE_EXPANSION,
361   /* All cgraph expansion is done.  */
362   CGRAPH_STATE_FINISHED
363 };
364 extern enum cgraph_state cgraph_state;
365 extern bool cgraph_function_flags_ready;
366 extern GTY(()) struct cgraph_node *cgraph_nodes_queue;
367 extern GTY(()) struct cgraph_node *cgraph_new_nodes;
368
369 extern GTY(()) struct cgraph_asm_node *cgraph_asm_nodes;
370 extern GTY(()) int cgraph_order;
371
372 /* In cgraph.c  */
373 void dump_cgraph (FILE *);
374 void debug_cgraph (void);
375 void dump_cgraph_node (FILE *, struct cgraph_node *);
376 void debug_cgraph_node (struct cgraph_node *);
377 void cgraph_insert_node_to_hashtable (struct cgraph_node *node);
378 void cgraph_remove_edge (struct cgraph_edge *);
379 void cgraph_remove_node (struct cgraph_node *);
380 void cgraph_remove_node_and_inline_clones (struct cgraph_node *);
381 void cgraph_release_function_body (struct cgraph_node *);
382 void cgraph_node_remove_callees (struct cgraph_node *node);
383 struct cgraph_edge *cgraph_create_edge (struct cgraph_node *,
384                                         struct cgraph_node *,
385                                         gimple, gcov_type, int, int);
386 struct cgraph_node *cgraph_node (tree);
387 struct cgraph_node *cgraph_node_for_asm (tree asmname);
388 struct cgraph_edge *cgraph_edge (struct cgraph_node *, gimple);
389 void cgraph_set_call_stmt (struct cgraph_edge *, gimple);
390 void cgraph_set_call_stmt_including_clones (struct cgraph_node *, gimple, gimple);
391 void cgraph_create_edge_including_clones (struct cgraph_node *,
392                                           struct cgraph_node *,
393                                           gimple, gcov_type, int, int,
394                                           cgraph_inline_failed_t);
395 void cgraph_update_edges_for_call_stmt (gimple, tree, gimple);
396 struct cgraph_local_info *cgraph_local_info (tree);
397 struct cgraph_global_info *cgraph_global_info (tree);
398 struct cgraph_rtl_info *cgraph_rtl_info (tree);
399 const char * cgraph_node_name (struct cgraph_node *);
400 struct cgraph_edge * cgraph_clone_edge (struct cgraph_edge *,
401                                         struct cgraph_node *,
402                                         gimple, gcov_type, int, int, bool);
403 struct cgraph_node * cgraph_clone_node (struct cgraph_node *, gcov_type, int,
404                                         int, bool);
405
406 void cgraph_redirect_edge_callee (struct cgraph_edge *, struct cgraph_node *);
407
408 struct cgraph_asm_node *cgraph_add_asm_node (tree);
409
410 bool cgraph_function_possibly_inlined_p (tree);
411 void cgraph_unnest_node (struct cgraph_node *);
412
413 enum availability cgraph_function_body_availability (struct cgraph_node *);
414 void cgraph_add_new_function (tree, bool);
415 const char* cgraph_inline_failed_string (cgraph_inline_failed_t);
416 struct cgraph_node * cgraph_create_virtual_clone (struct cgraph_node *old_node,
417                                                   VEC(cgraph_edge_p,heap)*,
418                                                   VEC(ipa_replace_map_p,gc)* tree_map,
419                                                   bitmap args_to_skip);
420
421 /* In cgraphunit.c  */
422 void cgraph_finalize_function (tree, bool);
423 void cgraph_mark_if_needed (tree);
424 void cgraph_finalize_compilation_unit (void);
425 void cgraph_optimize (void);
426 void cgraph_mark_needed_node (struct cgraph_node *);
427 void cgraph_mark_address_taken_node (struct cgraph_node *);
428 void cgraph_mark_reachable_node (struct cgraph_node *);
429 bool cgraph_inline_p (struct cgraph_edge *, cgraph_inline_failed_t *reason);
430 bool cgraph_preserve_function_body_p (tree);
431 void verify_cgraph (void);
432 void verify_cgraph_node (struct cgraph_node *);
433 void cgraph_build_static_cdtor (char which, tree body, int priority);
434 void cgraph_reset_static_var_maps (void);
435 void init_cgraph (void);
436 struct cgraph_node *cgraph_function_versioning (struct cgraph_node *,
437                                                 VEC(cgraph_edge_p,heap)*,
438                                                 VEC(ipa_replace_map_p,gc)*,
439                                                 bitmap);
440 void tree_function_versioning (tree, tree, VEC (ipa_replace_map_p,gc)*, bool, bitmap);
441 void cgraph_analyze_function (struct cgraph_node *);
442 struct cgraph_node *save_inline_function_body (struct cgraph_node *);
443 void record_references_in_initializer (tree);
444 bool cgraph_process_new_functions (void);
445
446 typedef void (*cgraph_edge_hook)(struct cgraph_edge *, void *);
447 typedef void (*cgraph_node_hook)(struct cgraph_node *, void *);
448 typedef void (*cgraph_2edge_hook)(struct cgraph_edge *, struct cgraph_edge *,
449                                   void *);
450 typedef void (*cgraph_2node_hook)(struct cgraph_node *, struct cgraph_node *,
451                                   void *);
452 struct cgraph_edge_hook_list;
453 struct cgraph_node_hook_list;
454 struct cgraph_2edge_hook_list;
455 struct cgraph_2node_hook_list;
456 struct cgraph_edge_hook_list *cgraph_add_edge_removal_hook (cgraph_edge_hook, void *);
457 void cgraph_remove_edge_removal_hook (struct cgraph_edge_hook_list *);
458 struct cgraph_node_hook_list *cgraph_add_node_removal_hook (cgraph_node_hook,
459                                                             void *);
460 void cgraph_remove_node_removal_hook (struct cgraph_node_hook_list *);
461 struct cgraph_node_hook_list *cgraph_add_function_insertion_hook (cgraph_node_hook,
462                                                                   void *);
463 void cgraph_remove_function_insertion_hook (struct cgraph_node_hook_list *);
464 void cgraph_call_function_insertion_hooks (struct cgraph_node *node);
465 struct cgraph_2edge_hook_list *cgraph_add_edge_duplication_hook (cgraph_2edge_hook, void *);
466 void cgraph_remove_edge_duplication_hook (struct cgraph_2edge_hook_list *);
467 struct cgraph_2node_hook_list *cgraph_add_node_duplication_hook (cgraph_2node_hook, void *);
468 void cgraph_remove_node_duplication_hook (struct cgraph_2node_hook_list *);
469 void cgraph_materialize_all_clones (void);
470
471 /* In cgraphbuild.c  */
472 unsigned int rebuild_cgraph_edges (void);
473 int compute_call_stmt_bb_frequency (tree, basic_block bb);
474
475 /* In ipa.c  */
476 bool cgraph_remove_unreachable_nodes (bool, FILE *);
477 int cgraph_postorder (struct cgraph_node **);
478 cgraph_node_set cgraph_node_set_new (void);
479 cgraph_node_set_iterator cgraph_node_set_find (cgraph_node_set,
480                                                struct cgraph_node *);
481 void cgraph_node_set_add (cgraph_node_set, struct cgraph_node *);
482 void cgraph_node_set_remove (cgraph_node_set, struct cgraph_node *);
483 void dump_cgraph_node_set (FILE *, cgraph_node_set);
484 void debug_cgraph_node_set (cgraph_node_set);
485
486
487 /* In predict.c  */
488 bool cgraph_maybe_hot_edge_p (struct cgraph_edge *e);
489
490 /* In varpool.c  */
491 extern GTY(()) struct varpool_node *varpool_nodes_queue;
492 extern GTY(()) struct varpool_node *varpool_nodes;
493
494 struct varpool_node *varpool_node (tree);
495 struct varpool_node *varpool_node_for_asm (tree asmname);
496 void varpool_mark_needed_node (struct varpool_node *);
497 void debug_varpool (void);
498 void dump_varpool (FILE *);
499 void dump_varpool_node (FILE *, struct varpool_node *);
500
501 void varpool_finalize_decl (tree);
502 bool decide_is_variable_needed (struct varpool_node *, tree);
503 enum availability cgraph_variable_initializer_availability (struct varpool_node *);
504
505 bool varpool_assemble_pending_decls (void);
506 bool varpool_assemble_decl (struct varpool_node *node);
507 bool varpool_analyze_pending_decls (void);
508 void varpool_remove_unreferenced_decls (void);
509 void varpool_empty_needed_queue (void);
510
511 /* Walk all reachable static variables.  */
512 #define FOR_EACH_STATIC_VARIABLE(node) \
513    for ((node) = varpool_nodes_queue; (node); (node) = (node)->next_needed)
514
515 /* Return first reachable static variable with initializer.  */
516 static inline struct varpool_node *
517 varpool_first_static_initializer (void)
518 {
519   struct varpool_node *node;
520   for (node = varpool_nodes_queue; node; node = node->next_needed)
521     {
522       gcc_assert (TREE_CODE (node->decl) == VAR_DECL);
523       if (DECL_INITIAL (node->decl))
524         return node;
525     }
526   return NULL;
527 }
528
529 /* Return next reachable static variable with initializer after NODE.  */
530 static inline struct varpool_node *
531 varpool_next_static_initializer (struct varpool_node *node)
532 {
533   for (node = node->next_needed; node; node = node->next_needed)
534     {
535       gcc_assert (TREE_CODE (node->decl) == VAR_DECL);
536       if (DECL_INITIAL (node->decl))
537         return node;
538     }
539   return NULL;
540 }
541
542 /* Walk all static variables with initializer set.  */
543 #define FOR_EACH_STATIC_INITIALIZER(node) \
544    for ((node) = varpool_first_static_initializer (); (node); \
545         (node) = varpool_next_static_initializer (node))
546
547 /* In ipa-inline.c  */
548 void cgraph_clone_inlined_nodes (struct cgraph_edge *, bool, bool);
549 unsigned int compute_inline_parameters (struct cgraph_node *);
550
551
552 /* Create a new static variable of type TYPE.  */
553 tree add_new_static_var (tree type);
554
555
556 /* Return true if iterator CSI points to nothing.  */
557 static inline bool
558 csi_end_p (cgraph_node_set_iterator csi)
559 {
560   return csi.index >= VEC_length (cgraph_node_ptr, csi.set->nodes);
561 }
562
563 /* Advance iterator CSI.  */
564 static inline void
565 csi_next (cgraph_node_set_iterator *csi)
566 {
567   csi->index++;
568 }
569
570 /* Return the node pointed to by CSI.  */
571 static inline struct cgraph_node *
572 csi_node (cgraph_node_set_iterator csi)
573 {
574   return VEC_index (cgraph_node_ptr, csi.set->nodes, csi.index);
575 }
576
577 /* Return an iterator to the first node in SET.  */
578 static inline cgraph_node_set_iterator
579 csi_start (cgraph_node_set set)
580 {
581   cgraph_node_set_iterator csi;
582
583   csi.set = set;
584   csi.index = 0;
585   return csi;
586 }
587
588 /* Return true if SET contains NODE.  */
589 static inline bool
590 cgraph_node_in_set_p (struct cgraph_node *node, cgraph_node_set set)
591 {
592   cgraph_node_set_iterator csi;
593   csi = cgraph_node_set_find (set, node);
594   return !csi_end_p (csi);
595 }
596
597 /* Return number of nodes in SET.  */
598 static inline size_t
599 cgraph_node_set_size (cgraph_node_set set)
600 {
601   return htab_elements (set->hashtab);
602 }
603
604
605 #endif  /* GCC_CGRAPH_H  */