diff options
author | Paolo Bonzini <bonzini@gnu.org> | 2004-05-25 12:04:17 +0000 |
---|---|---|
committer | Paolo Bonzini <bonzini@gcc.gnu.org> | 2004-05-25 12:04:17 +0000 |
commit | 2f93eea8612d4ced2eeee52db5ce66bd75303455 (patch) | |
tree | 0fecbc9fb7d6fe74247aea9809ba392638ca87c6 /gcc/cse.c | |
parent | 11338cda74ae54f5f8a86a271bcd04cb604ec806 (diff) | |
download | gcc-2f93eea8612d4ced2eeee52db5ce66bd75303455.zip gcc-2f93eea8612d4ced2eeee52db5ce66bd75303455.tar.gz gcc-2f93eea8612d4ced2eeee52db5ce66bd75303455.tar.bz2 |
Makefile.in (OBJS): Add rtlhooks.o.
2004-05-25 Paolo Bonzini <bonzini@gnu.org>
* Makefile.in (OBJS): Add rtlhooks.o.
(rtlanal.o): Depend on function.h.
(cse.o): Depend on rtlhooks-def.h.
(combine.o): Depend on rtlhooks-def.h.
(rtlhooks.o): New rule.
* combine.c: Include rtlhooks-def.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): Move most of the code to rtlanal.c.
(reg_nonzero_bits_for_combine,
reg_num_sign_bit_copies_for_combine): New functions holding
the remnants of the above.
(combine_rtl_hooks): New.
(combine_instructions): Set rtl_hooks instead of gen_lowpart.
* cse.c: Include rtlhooks-def.h.
(cse_rtl_hooks): New.
(cse_main): Set rtl_hooks instead of gen_lowpart.
* emit-rtl.c (gen_lowpart): Remove.
(gen_lowpart_general): Move to rtlhooks.c.
* rtl.h (nonzero_bits, num_sign_bit_copies,
struct rtl_hooks, rtl_hooks, general_rtl_hooks): New.
(gen_lowpart_general): Remove.
(gen_lowpart): Temporarily redefine as a macro.
* rtlanal.c: Include function.h.
(nonzero_bits, cached_nonzero_bits, nonzero_bits1,
num_sign_bit_copies, cached_num_sign_bit_copies,
num_sign_bit_copies1): New, from combine.c.
* rtlhooks.c: New file.
From-SVN: r82234
Diffstat (limited to 'gcc/cse.c')
-rw-r--r-- | gcc/cse.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -43,6 +43,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA #include "except.h" #include "target.h" #include "params.h" +#include "rtlhooks-def.h" /* The basic idea of common subexpression elimination is to go through the code, keeping a record of expressions that would @@ -664,6 +665,12 @@ static int cse_change_cc_mode (rtx *, void *); static void cse_change_cc_mode_insns (rtx, rtx, rtx); static enum machine_mode cse_cc_succs (basic_block, rtx, rtx, bool); + +#undef RTL_HOOKS_GEN_LOWPART +#define RTL_HOOKS_GEN_LOWPART gen_lowpart_if_possible + +static const struct rtl_hooks cse_rtl_hooks = RTL_HOOKS_INITIALIZER; + /* Nonzero if X has the form (PLUS frame-pointer integer). We check for virtual regs here because the simplify_*_operation routines are called by integrate.c, which is called before virtual register instantiation. */ @@ -6881,7 +6888,7 @@ cse_main (rtx f, int nregs, int after_loop, FILE *file) constant_pool_entries_cost = 0; constant_pool_entries_regcost = 0; val.path_size = 0; - gen_lowpart = gen_lowpart_if_possible; + rtl_hooks = cse_rtl_hooks; init_recog (); init_alias_analysis (); @@ -7001,7 +7008,7 @@ cse_main (rtx f, int nregs, int after_loop, FILE *file) free (uid_cuid); free (reg_eqv_table); free (val.path); - gen_lowpart = gen_lowpart_general; + rtl_hooks = general_rtl_hooks; return cse_jumps_altered || recorded_label_ref; } |