[llvm-commits] [llvm-gcc-4.2] r44442 - in /llvm-gcc-4.2/trunk/gcc: passes.c tree-optimize.c tree-pass.h
Anton Korobeynikov
asl at math.spbu.ru
Thu Nov 29 13:36:16 PST 2007
Author: asl
Date: Thu Nov 29 15:36:16 2007
New Revision: 44442
URL: http://llvm.org/viewvc/llvm-project?rev=44442&view=rev
Log:
Move second openmp expansion pass before llvm-convert. This allows us not to
reinvent a wheel and rewrite all openmp lowering code at llvm side :)
Thanks to Wojciech Matyjewicz for inspiration :)
Modified:
llvm-gcc-4.2/trunk/gcc/passes.c
llvm-gcc-4.2/trunk/gcc/tree-optimize.c
llvm-gcc-4.2/trunk/gcc/tree-pass.h
Modified: llvm-gcc-4.2/trunk/gcc/passes.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/passes.c?rev=44442&r1=44441&r2=44442&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/passes.c (original)
+++ llvm-gcc-4.2/trunk/gcc/passes.c Thu Nov 29 15:36:16 2007
@@ -334,6 +334,11 @@
/* The root of the compilation pass tree, once constructed. */
struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
+/* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+struct tree_opt_pass *all_extra_lowering_passes;
+#endif
+/* LLVM LOCAL end */
/* Iterate over the pass tree allocating dump file numbers. We want
to do this depth first, and independent of whether the pass is
@@ -511,6 +516,17 @@
NEXT_PASS (pass_rebuild_cgraph_edges);
*p = NULL;
+ /* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+ p = &all_extra_lowering_passes;
+ NEXT_PASS (pass_fixup_cfg);
+ NEXT_PASS (pass_init_datastructures);
+ NEXT_PASS (pass_expand_omp);
+ NEXT_PASS (pass_free_datastructures);
+ *p = NULL;
+#endif
+ /* LLVM LOCAL end */
+
p = &all_passes;
NEXT_PASS (pass_fixup_cfg);
NEXT_PASS (pass_init_datastructures);
@@ -742,6 +758,13 @@
PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
| PROP_cfg);
register_dump_files (all_lowering_passes, false, PROP_gimple_any);
+ /* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+ register_dump_files (all_extra_lowering_passes, false,
+ PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
+ | PROP_cfg);
+#endif
+ /* LLVM LOCAL end */
register_dump_files (all_passes, false,
PROP_gimple_any | PROP_gimple_lcf | PROP_gimple_leh
| PROP_cfg);
Modified: llvm-gcc-4.2/trunk/gcc/tree-optimize.c
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-optimize.c?rev=44442&r1=44441&r2=44442&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-optimize.c (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-optimize.c Thu Nov 29 15:36:16 2007
@@ -473,6 +473,7 @@
/* Perform all tree transforms and optimizations. */
/* LLVM LOCAL begin */
#ifdef ENABLE_LLVM
+ execute_pass_list(all_extra_lowering_passes);
llvm_emit_code_for_current_function(fndecl);
#else
execute_pass_list (all_passes);
Modified: llvm-gcc-4.2/trunk/gcc/tree-pass.h
URL: http://llvm.org/viewvc/llvm-project/llvm-gcc-4.2/trunk/gcc/tree-pass.h?rev=44442&r1=44441&r2=44442&view=diff
==============================================================================
--- llvm-gcc-4.2/trunk/gcc/tree-pass.h (original)
+++ llvm-gcc-4.2/trunk/gcc/tree-pass.h Thu Nov 29 15:36:16 2007
@@ -397,6 +397,11 @@
/* The root of the compilation pass tree, once constructed. */
extern struct tree_opt_pass *all_passes, *all_ipa_passes, *all_lowering_passes;
+/* LLVM LOCAL begin */
+#ifdef ENABLE_LLVM
+extern struct tree_opt_pass *all_extra_lowering_passes;
+#endif
+/* LLVM LOCAL end */
extern void execute_pass_list (struct tree_opt_pass *);
extern void execute_ipa_pass_list (struct tree_opt_pass *);
More information about the llvm-commits
mailing list