[llvm-commits] [dragonegg] r141530 - /dragonegg/trunk/src/Backend.cpp
Duncan Sands
baldrick at free.fr
Mon Oct 10 04:24:32 PDT 2011
Author: baldrick
Date: Mon Oct 10 06:24:31 2011
New Revision: 141530
URL: http://llvm.org/viewvc/llvm-project?rev=141530&view=rev
Log:
Disable the vector lowering (i.e. vector scalarization) and early inliner passes
when GCC optimizations are turned off. Reorder to match passes.c from gcc-4.6
(previously it was based on gcc-4.5).
Modified:
dragonegg/trunk/src/Backend.cpp
Modified: dragonegg/trunk/src/Backend.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Backend.cpp?rev=141530&r1=141529&r2=141530&view=diff
==============================================================================
--- dragonegg/trunk/src/Backend.cpp (original)
+++ dragonegg/trunk/src/Backend.cpp Mon Oct 10 06:24:31 2011
@@ -2080,8 +2080,7 @@
// Could just set optimize to zero (after taking a copy), but this would
// also impact front-end optimizations.
- // Leave pass_inline_parameters. Otherwise our vector lowering fails since
- // immediates have not been propagated into builtin callsites.
+ // Leave pass_ipa_free_lang_data.
// Leave pass_ipa_function_and_variable_visibility. Needed for correctness.
@@ -2094,14 +2093,8 @@
register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
#endif
- // Leave pass_ipa_free_lang_data.
-
// Leave pass pass_early_local_passes::pass_fixup_cfg. ???
- // Leave pass pass_early_local_passes::pass_tree_profile.
-
- // Leave pass_early_local_passes::pass_cleanup_cfg. ???
-
// Leave pass_early_local_passes::pass_init_datastructures. ???
// Leave pass_early_local_passes::pass_expand_omp.
@@ -2110,13 +2103,26 @@
// Leave pass_early_local_passes::pass_build_ssa.
+ // Turn off pass_lower_vector.
+ pass_info.pass = &pass_gimple_null.pass;
+ pass_info.reference_pass_name = "veclower";
+ pass_info.ref_pass_instance_number = 0;
+ pass_info.pos_op = PASS_POS_REPLACE;
+ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
+
// Leave pass_early_local_passes::pass_early_warn_uninitialized.
// Leave pass_early_local_passes::pass_rebuild_cgraph_edges. ???
- // Leave pass_early_local_passes::pass_early_inline. Otherwise our vector
- // lowering fails since immediates have not been propagated into builtin
- // callsites.
+ // Leave pass_inline_parameters. Otherwise our vector lowering fails since
+ // immediates have not been propagated into builtin callsites.
+
+ // Turn off pass_early_inline.
+ pass_info.pass = &pass_gimple_null.pass;
+ pass_info.reference_pass_name = "einline";
+ pass_info.ref_pass_instance_number = 0;
+ pass_info.pos_op = PASS_POS_REPLACE;
+ register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
// Insert a pass that ensures that any newly inserted functions, for example
// those generated by OMP expansion, are processed before being converted to
@@ -2141,6 +2147,8 @@
// Leave pass_inline_parameters. Otherwise our vector lowering fails since
// immediates have not been propagated into builtin callsites.
+ // Leave pass pass_early_local_passes::pass_tree_profile.
+
// Turn off pass_ipa_increase_alignment.
pass_info.pass = &pass_simple_ipa_null.pass;
pass_info.reference_pass_name = "increase_alignment";
@@ -2155,8 +2163,12 @@
pass_info.pos_op = PASS_POS_REPLACE;
register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
+ // Leave pass_ipa_lower_emutls. ???
+
// Leave pass_ipa_whole_program_visibility. ???
+ // Leave pass_ipa_profile. ???
+
// Turn off pass_ipa_cp.
pass_info.pass = &pass_ipa_null.pass;
pass_info.reference_pass_name = "cp";
@@ -2164,6 +2176,8 @@
pass_info.pos_op = PASS_POS_REPLACE;
register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
+ // Leave pass_ipa_cdtor_merge.
+
// Turn off pass_ipa_inline.
pass_info.pass = &pass_ipa_null.pass;
pass_info.reference_pass_name = "inline";
@@ -2171,16 +2185,16 @@
pass_info.pos_op = PASS_POS_REPLACE;
register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
- // Turn off pass_ipa_reference.
+ // Turn off pass_ipa_pure_const.
pass_info.pass = &pass_ipa_null.pass;
- pass_info.reference_pass_name = "static-var";
+ pass_info.reference_pass_name = "pure-const";
pass_info.ref_pass_instance_number = 0;
pass_info.pos_op = PASS_POS_REPLACE;
register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
- // Turn off pass_ipa_pure_const.
+ // Turn off pass_ipa_reference.
pass_info.pass = &pass_ipa_null.pass;
- pass_info.reference_pass_name = "pure-const";
+ pass_info.reference_pass_name = "static-var";
pass_info.ref_pass_instance_number = 0;
pass_info.pos_op = PASS_POS_REPLACE;
register_callback(plugin_name, PLUGIN_PASS_MANAGER_SETUP, NULL, &pass_info);
More information about the llvm-commits
mailing list