Lines Matching refs:pass

83 #include "tree-pass.h"
300 /* The root of the compilation pass tree, once constructed. */
303 /* Iterate over the pass tree allocating dump file numbers. We want
304 to do this depth first, and independent of whether the pass is
308 register_one_dump_file (struct tree_opt_pass *pass, bool ipa, int properties)
317 if (pass->static_pass_number != -1)
318 sprintf (num, "%d", ((int) pass->static_pass_number < 0
319 ? 1 : pass->static_pass_number));
321 dot_name = concat (".", pass->name, num, NULL);
329 flag_name = concat (prefix, pass->name, num, NULL);
330 glob_name = concat (prefix, pass->name, NULL);
331 pass->static_pass_number = dump_register (dot_name, flag_name, glob_name,
332 flags, pass->letter);
338 register_dump_files_1 (struct tree_opt_pass *pass, bool ipa, int properties)
342 int new_properties = (properties | pass->properties_provided)
343 & ~pass->properties_destroyed;
345 if (pass->name)
346 register_one_dump_file (pass, ipa, new_properties);
348 if (pass->sub)
349 new_properties = register_dump_files_1 (pass->sub, false,
353 and without the pass being examined. */
354 if (pass->gate)
359 pass = pass->next;
361 while (pass);
367 true if the pass is inter-procedural, and PROPERTIES reflects the
372 register_dump_files (struct tree_opt_pass *pass, bool ipa, int properties)
374 pass->properties_required |= properties;
375 pass->todo_flags_start |= TODO_set_props;
376 register_dump_files_1 (pass, ipa, properties);
379 /* Add a pass to the pass list. Duplicate the pass if it's already
383 next_pass_1 (struct tree_opt_pass **list, struct tree_opt_pass *pass)
386 pass is already in the list. */
387 if (pass->static_pass_number)
392 memcpy (new, pass, sizeof (*new));
394 /* Indicate to register_dump_files that this pass has duplicates,
398 if (pass->name)
400 pass->static_pass_number -= 1;
401 new->static_pass_number = -pass->static_pass_number;
408 pass->static_pass_number = -1;
409 *list = pass;
416 /* Construct the pass tree. The sequencing of passes is driven by
512 run the full propagators, run a specialized pass which
534 run the full propagators, run a specialized pass which
565 run the full propagators, run a specialized pass which
746 if the parent pass had not scheduled an SSA update, we may
827 execute_one_pass (struct tree_opt_pass *pass)
832 /* See if we're supposed to run this pass. */
833 if (pass->gate && !pass->gate ())
836 if (pass->todo_flags_start & TODO_set_props)
837 curr_properties = pass->properties_required;
843 /* Run pre-pass verification. */
844 execute_todo (pass->todo_flags_start);
846 gcc_assert ((curr_properties & pass->properties_required)
847 == pass->properties_required);
849 if (pass->properties_destroyed & PROP_smt_usage)
853 if (pass->static_pass_number != -1)
855 initializing_dump = !dump_initialized_p (pass->static_pass_number);
856 dump_file_name = get_dump_file_name (pass->static_pass_number);
857 dump_file = dump_begin (pass->static_pass_number, &dump_flags);
876 if (pass->tv_id)
877 timevar_push (pass->tv_id);
880 if (pass->execute)
882 todo_after = pass->execute ();
887 if (pass->tv_id)
888 timevar_pop (pass->tv_id);
890 curr_properties = (curr_properties | pass->properties_provided)
891 & ~pass->properties_destroyed;
898 get_dump_file_info (pass->static_pass_number)->flags |= TDF_GRAPH;
903 /* Run post-pass cleanup and verification. */
904 execute_todo (todo_after | pass->todo_flags_finish);
915 dump_end (pass->static_pass_number, dump_file);
919 if (pass->properties_destroyed & PROP_smt_usage)
929 execute_pass_list (struct tree_opt_pass *pass)
933 if (execute_one_pass (pass) && pass->sub)
934 execute_pass_list (pass->sub);
935 pass = pass->next;
937 while (pass);
943 execute_ipa_pass_list (struct tree_opt_pass *pass)
947 if (execute_one_pass (pass) && pass->sub)
955 execute_pass_list (pass->sub);
963 pass = pass->next;
965 while (pass);