summaryrefslogtreecommitdiff
path: root/gcc/passes.c
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-23 18:05:38 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-23 18:05:38 +0000
commitae6ad54a6d35963921b0ee1a4891e016244731bf (patch)
tree6a2a80d1d6e49de77fef8a2fdd63ede5d9d62159 /gcc/passes.c
parent482cc0ed3403f305424a5237f52049c5eb65b0d6 (diff)
downloadgcc-ae6ad54a6d35963921b0ee1a4891e016244731bf.tar.gz
* passes.c (init_optimization_passes): Document
sequencing of passes. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107425 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/passes.c')
-rw-r--r--gcc/passes.c25
1 files changed, 21 insertions, 4 deletions
diff --git a/gcc/passes.c b/gcc/passes.c
index 0053f70dcce..7add1208069 100644
--- a/gcc/passes.c
+++ b/gcc/passes.c
@@ -420,7 +420,25 @@ next_pass_1 (struct tree_opt_pass **list, struct tree_opt_pass *pass)
}
-/* Construct the pass tree. */
+/* Construct the pass tree. The sequencing of passes is driven by
+ the cgraph routines:
+
+ cgraph_finalize_compilation_unit ()
+ for each node N in the cgraph
+ cgraph_analyze_function (N)
+ cgraph_lower_function (N) -> all_lowering_passes
+
+ If we are optimizing, cgraph_optimize is then invoked:
+
+ cgraph_optimize ()
+ ipa_passes () -> all_ipa_passes
+ cgraph_expand_all_functions ()
+ for each node N in the cgraph
+ cgraph_expand_function (N)
+ cgraph_lower_function (N) -> Now a NOP.
+ lang_hooks.callgraph.expand_function (DECL (N))
+ tree_rest_of_compilation (DECL (N)) -> all_passes
+*/
void
init_optimization_passes (void)
@@ -439,9 +457,8 @@ init_optimization_passes (void)
NEXT_PASS (pass_ipa_type_escape);
*p = NULL;
- /* All passes needed to lower the function into shape optimizers can operate
- on. These passes are performed before interprocedural passes, unlike rest
- of local passes (all_passes). */
+ /* All passes needed to lower the function into shape optimizers can
+ operate on. */
p = &all_lowering_passes;
NEXT_PASS (pass_remove_useless_stmts);
NEXT_PASS (pass_mudflap_1);