summaryrefslogtreecommitdiff
path: root/gcc/target-globals.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-01 14:45:24 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-05-01 14:45:24 +0000
commitc7944dcedf702fbf1a8a802158732a46b5d72830 (patch)
tree4e8ab9b9d983a212b8aa35ed9a63c7bffb107ef5 /gcc/target-globals.c
parente7fd8dfafd84cfd4c885a178508ade470abac0e6 (diff)
downloadgcc-c7944dcedf702fbf1a8a802158732a46b5d72830.tar.gz
gcc/
2012-03-31 Kenneth Zadeck <zadeck@naturalbridge.com> Richard Sandiford <r.sandiford@uk.ibm.com> * Makefile.in (lower-subreg.o, target-globals.o): Depend on lower-subreg.h. * lower-subreg.h: New file. * target-globals.h (this_target_lower_subreg): Declare. (target_globals): Add lower_subreg; (restore_target_globals): Restore this_target_lower_subreg. * target-globals.c: Include it. (default_target_globals): Add default_target_lower_subreg. (save_target_globals): Initialize target_lower_subreg. * rtl.h (init_lower_subreg): Added declaration. * toplev.c (backend_init_target): Call initializer for lower-subreg pass. * lower-subreg.c (LOG_COSTS, FORCE_LOWERING): New macros. (default_target_lower_subreg): New variable. (this_target_lower_subreg): Likewise. (twice_word_mode, choices): New macros. (shift_cost, compute_splitting_shift, compute_costs) (init_lower_subreg): New functions. (resolve_simple_move): Add speed_p argument. Check choices. (find_pseudo_copy): Don't check the mode size here. (resolve_simple_move): Assert the mode size. (find_decomposable_shift_zext): Add speed_p argument and return a bool. Check choices. (resolve_shift_zext): Add comment. (dump_shift_choices, dump_choices): New functions. (decompose_multiword_subregs): Dump list of profitable transformations. Add code to skip non profitable transformations. Update calls to simple_move and find_decomposable_shift_zext. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@187015 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/target-globals.c')
-rw-r--r--gcc/target-globals.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gcc/target-globals.c b/gcc/target-globals.c
index 7a4058ebd18..e679f21614e 100644
--- a/gcc/target-globals.c
+++ b/gcc/target-globals.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "builtins.h"
#include "gcse.h"
#include "bb-reorder.h"
+#include "lower-subreg.h"
#if SWITCHABLE_TARGET
struct target_globals default_target_globals = {
@@ -56,7 +57,8 @@ struct target_globals default_target_globals = {
&default_target_ira_int,
&default_target_builtins,
&default_target_gcse,
- &default_target_bb_reorder
+ &default_target_bb_reorder,
+ &default_target_lower_subreg
};
struct target_globals *
@@ -79,6 +81,7 @@ save_target_globals (void)
g->builtins = XCNEW (struct target_builtins);
g->gcse = XCNEW (struct target_gcse);
g->bb_reorder = XCNEW (struct target_bb_reorder);
+ g->lower_subreg = XCNEW (struct target_lower_subreg);
restore_target_globals (g);
init_reg_sets ();
target_reinit ();