#include "config.h"#include "system.h"#include "coretypes.h"#include "tm.h"#include "rtl.h"#include "obstack.h"#include "basic-block.h"#include "resource.h"#include "flags.h"#include "ggc.h"#include "regs.h"#include "params.h"#include "expr.h"#include "tm_p.h"#include "tree-pass.h"#include "tree-flow.h"#include "timevar.h"#include "output.h"#include "addresses.h"

Go to the source code of this file.
| #define HASH_INIT 1023 |
Definition at line 138 of file rtl-factoring.c.
Referenced by fill_hash_bucket(), and rtl_seqabstr().
| #define RECOMPUTE_COST | ( | SEQ | ) |
Value:
{ \
int l; \
rtx x = SEQ->insn; \
SEQ->cost = 0; \
for (l = 0; l < SEQ->abstracted_length; l++) \
{ \
SEQ->cost += compute_rtx_cost (x); \
x = prev_insn_in_block (x); \
} \
}
Definition at line 147 of file rtl-factoring.c.
Referenced by recompute_gain_for_pattern_seq().
| #define SEQ_CALL_COST_MULTIPLIER 2 |
| typedef struct matching_seq_def * matching_seq |
| typedef struct hash_bucket_def * p_hash_bucket |
| typedef struct hash_elem_def * p_hash_elem |
| typedef struct pattern_seq_def * pattern_seq |
| typedef struct seq_block_def * seq_block |
Definition at line 1122 of file rtl-factoring.c.
References determine_seq_blocks(), erase_matching_seqs(), free_pattern_seq(), free_seq_blocks(), pattern_seq_def::link_reg, pattern_seq_def::next_pattern_seq, REGNO, regs_ever_live, split_blocks_after_seqs(), and split_pattern_seq().
Referenced by rtl_seqabstr().
Definition at line 951 of file rtl-factoring.c.
References BB_END, BLOCK_FOR_INSN, block_label(), dest, EXIT_BLOCK_PTR, basic_block_def::next_bb, and split_block().
Referenced by erase_matching_seqs(), split_blocks_after_seqs(), and split_pattern_seq().
Definition at line 533 of file rtl-factoring.c.
References AND_COMPL_HARD_REG_SET, BB_END, BLOCK_FOR_INSN, CLEAR_REG_SET, COPY_REG_SET, free_propagate_block_info(), basic_block_def::global_live_at_end, HARD_REG_SET, i, init_propagate_block_info(), INIT_REG_SET, INSN_P, NULL, prev, propagate_one_insn(), renumbered_reg_set_to_hard_reg_set(), and x.
Referenced by recompute_gain_for_pattern_seq().
Definition at line 440 of file rtl-factoring.c.
References BB_END, BB_HEAD, bitmap_bit_p(), bitmap_clear(), bitmap_head, bitmap_initialize(), bitmap_set_bit(), CLEAR_REG_SET, COPY_REG_SET, FIRST_STACK_REG, FOR_EACH_BB, FOR_EACH_HTAB_ELEMENT, free_propagate_block_info(), basic_block_def::global_live_at_end, hash_buckets, htab_elements, init_propagate_block_info(), INIT_REG_SET, hash_elem_def::insn, insn, INSN_UID, LAST_STACK_REG, match_seqs(), NULL, propagate_one_insn(), REGNO_REG_SET_P, hash_bucket_def::seq_candidates, and STACK_REGS.
Referenced by rtl_seqabstr().
| static unsigned int compute_hash | ( | rtx | insn | ) | [static] |
Definition at line 295 of file rtl-factoring.c.
References INSN_CODE, prev, and prev_insn_in_block().
Referenced by compute_rtx_cost(), and fill_hash_bucket().
Definition at line 1320 of file rtl-factoring.c.
References BB_HEAD, block_label(), compute_rtx_cost(), FOR_EACH_BB, gen_indirect_jump(), gen_jump(), gen_rtx_REG(), gen_rtx_SET, gen_symbol_ref_rtx_for_label(), int, make_insn_raw(), make_jump_insn_raw(), Pmode, seq_call_cost, SEQ_CALL_COST_MULTIPLIER, seq_jump_cost, and seq_return_cost.
Referenced by rtl_seqabstr().
| static int compute_rtx_cost | ( | rtx | insn | ) | [static] |
Definition at line 312 of file rtl-factoring.c.
References compute_hash(), COSTS_N_INSNS, get_attr_length(), hash_bucket_def::hash, hash_buckets, htab_find(), hash_elem_def::insn, and NULL.
Referenced by compute_init_costs(), erase_from_pattern_seqs(), and matching_length().
Definition at line 873 of file rtl-factoring.c.
References seq_block_def::label, seq_block_def::length, pattern_seq_def::matching_seqs, seq_block_def::matching_seqs, matching_seq_def::next_matching_seq, seq_block_def::next_seq_block, NULL_RTX, seq_call_cost, and xmalloc().
Referenced by abstract_best_seq().
| static void dump_best_pattern_seq | ( | int | iter | ) | [static] |
Definition at line 1174 of file rtl-factoring.c.
References matching_seq_def::abstracted_length, pattern_seq_def::abstracted_length, dump_file, fprintf(), pattern_seq_def::gain, pattern_seq_def::insn, matching_seq_def::insn, INSN_UID, pattern_seq_def::link_reg, pattern_seq_def::matching_seqs, matching_seq_def::next_matching_seq, and REGNO.
Referenced by rtl_seqabstr().
Definition at line 1145 of file rtl-factoring.c.
References dump_file, fprintf(), pattern_seq_def::insn, matching_seq_def::insn, INSN_UID, matching_seq_def::matching_length, pattern_seq_def::matching_seqs, matching_seq_def::next_matching_seq, and pattern_seq_def::next_pattern_seq.
Referenced by rtl_seqabstr().
Definition at line 775 of file rtl-factoring.c.
References compute_rtx_cost(), free(), free_pattern_seq(), matching_seq_def::next_matching_seq, pattern_seq_def::next_pattern_seq, prev_insn_in_block(), seq_call_cost, and x.
Referenced by update_pattern_seqs().
Definition at line 1041 of file rtl-factoring.c.
References BB_END, BLOCK_FOR_INSN, block_label_after(), delete_basic_block(), dest, EDGE_ABNORMAL, emit_barrier_after(), emit_insn_after(), emit_jump_insn_after(), gen_jump(), gen_move_insn(), gen_symbol_ref_rtx_for_label(), basic_block_def::global_live_at_end, i, matching_seq_def::insn, insn, IOR_REG_SET, JUMP_LABEL, seq_block_def::label, LABEL_NUSES, LABEL_PRESERVE_P, seq_block_def::length, pattern_seq_def::link_reg, make_edge(), make_single_succ_edge(), seq_block_def::matching_seqs, matching_seq_def::next_matching_seq, seq_block_def::next_seq_block, prev_insn_in_block(), REGNO, SET_REGNO_REG_SET, and split_block().
Referenced by abstract_best_seq().
Definition at line 1260 of file rtl-factoring.c.
References ABSTRACTABLE_INSN_P, compute_hash(), FOR_BB_INSNS_REVERSE, FOR_EACH_BB, get_attr_length(), hash_bucket_def::hash, hash_buckets, HASH_INIT, htab_create(), htab_del_elem(), htab_eq_elem(), htab_find(), htab_find_slot(), htab_hash_elem(), INSERT, insn, NULL, hash_bucket_def::seq_candidates, and xcalloc().
Referenced by rtl_seqabstr().
| static void free_pattern_seq | ( | pattern_seq | pseq | ) | [static] |
Definition at line 718 of file rtl-factoring.c.
References free(), pattern_seq_def::matching_seqs, and matching_seq_def::next_matching_seq.
Referenced by abstract_best_seq(), erase_from_pattern_seqs(), and recompute_gain().
Definition at line 1101 of file rtl-factoring.c.
References free(), seq_block_def::matching_seqs, matching_seq_def::next_matching_seq, and seq_block_def::next_seq_block.
Referenced by abstract_best_seq().
Definition at line 1412 of file rtl-factoring.c.
Definition at line 936 of file rtl-factoring.c.
References ASM_GENERATE_INTERNAL_LABEL, CODE_LABEL_NUMBER, gen_rtx_SYMBOL_REF, ggc_strdup, Pmode, sym, SYMBOL_FLAG_LOCAL, and SYMBOL_REF_FLAGS.
Referenced by compute_init_costs(), erase_matching_seqs(), and split_pattern_seq().
Definition at line 1220 of file rtl-factoring.c.
References free(), htab_delete(), and hash_bucket_def::seq_candidates.
Referenced by rtl_seqabstr().
Definition at line 1250 of file rtl-factoring.c.
References free().
Referenced by fill_hash_bucket().
Definition at line 1212 of file rtl-factoring.c.
References htab_hash_bucket().
Referenced by rtl_seqabstr().
Definition at line 1242 of file rtl-factoring.c.
References htab_hash_elem().
Referenced by fill_hash_bucket().
| static unsigned int htab_hash_bucket | ( | const void * | p | ) | [static] |
Definition at line 1203 of file rtl-factoring.c.
References hash_bucket_def::hash.
Referenced by htab_eq_bucket(), and rtl_seqabstr().
| static unsigned int htab_hash_elem | ( | const void * | p | ) | [static] |
Definition at line 1233 of file rtl-factoring.c.
References htab_hash_pointer, and hash_elem_def::insn.
Referenced by fill_hash_bucket(), and htab_eq_elem().
| static void match_seqs | ( | p_hash_elem | e0, | |
| p_hash_elem | e1 | |||
| ) | [static] |
Definition at line 381 of file rtl-factoring.c.
References matching_seq_def::abstracted_length, pattern_seq_def::abstracted_length, matching_seq_def::cost, pattern_seq_def::cost, pattern_seq_def::gain, matching_seq_def::idx, hash_elem_def::idx, pattern_seq_def::idx, hash_elem_def::insn, pattern_seq_def::insn, matching_seq_def::insn, len, pattern_seq_def::link_reg, matching_length(), matching_seq_def::matching_length, pattern_seq_def::matching_seqs, matching_seq_def::next_matching_seq, pattern_seq_def::next_pattern_seq, NULL, NULL_RTX, seq_call_cost, and xmalloc().
Referenced by collect_pattern_seqs().
Definition at line 358 of file rtl-factoring.c.
References compute_rtx_cost(), PATTERN, prev_insn_in_block(), rtx_equal_p(), x1, and x2.
Referenced by match_seqs().
Definition at line 276 of file rtl-factoring.c.
References BB_HEAD, BLOCK_FOR_INSN, INSN_P, NULL_RTX, and PREV_INSN.
Referenced by compute_hash(), erase_from_pattern_seqs(), erase_matching_seqs(), matching_length(), recompute_gain_for_pattern_seq(), and split_pattern_seq().
Definition at line 735 of file rtl-factoring.c.
References free_pattern_seq(), pattern_seq_def::gain, pattern_seq_def::next_pattern_seq, and recompute_gain_for_pattern_seq().
Referenced by rtl_seqabstr().
| static void recompute_gain_for_pattern_seq | ( | pattern_seq | pseq | ) | [static] |
Definition at line 581 of file rtl-factoring.c.
References matching_seq_def::abstracted_length, pattern_seq_def::abstracted_length, base_reg_class(), CALL_P, call_used_regs, CLEAR_HARD_REG_BIT, clear_regs_live_in_seq(), matching_seq_def::cost, pattern_seq_def::cost, FIRST_PSEUDO_REGISTER, fixed_regs, pattern_seq_def::gain, gen_rtx_REG(), HARD_REG_SET, i, matching_seq_def::idx, pattern_seq_def::insn, matching_seq_def::insn, int, pattern_seq_def::link_reg, matching_seq_def::matching_length, pattern_seq_def::matching_seqs, MEM, matching_seq_def::next_matching_seq, NULL_RTX, ok_for_base_p_1(), Pmode, prev_insn_in_block(), RECOMPUTE_COST, reg_class_subset_p(), REGNO_REG_CLASS, regs_ever_live, seq_call_cost, seq_jump_cost, seq_return_cost, SET_HARD_REG_SET, TEST_HARD_REG_BIT, and x.
Referenced by recompute_gain().
Definition at line 519 of file rtl-factoring.c.
References FIRST_PSEUDO_REGISTER, max_regno, r, reg_renumber, REG_SET_TO_HARD_REG_SET, REGNO_REG_SET_P, and SET_HARD_REG_BIT.
Referenced by clear_regs_live_in_seq().
| static unsigned int rest_of_rtl_seqabstr | ( | void | ) | [static] |
Definition at line 1420 of file rtl-factoring.c.
References cleanup_cfg(), CLEANUP_CROSSJUMP, CLEANUP_EXPENSIVE, CLEANUP_UPDATE_LIFE, flag_crossjumping, life_analysis(), PROP_DEATH_NOTES, PROP_KILL_DEAD_CODE, PROP_SCAN_DEAD_CODE, and rtl_seqabstr().
Definition at line 1359 of file rtl-factoring.c.
References abstract_best_seq(), cleanup_cfg(), CLEANUP_CROSSJUMP, CLEANUP_EXPENSIVE, CLEANUP_UPDATE_LIFE, collect_pattern_seqs(), compute_init_costs(), count_or_remove_death_notes(), dump_best_pattern_seq(), dump_pattern_seqs(), fill_hash_bucket(), flag_crossjumping, hash_buckets, HASH_INIT, htab_create(), htab_del_bucket(), htab_delete(), htab_eq_bucket(), htab_hash_bucket(), iter, life_analysis(), NULL, PROP_DEATH_NOTES, PROP_KILL_DEAD_CODE, PROP_SCAN_DEAD_CODE, recompute_gain(), and update_pattern_seqs().
Referenced by rest_of_rtl_seqabstr().
Definition at line 966 of file rtl-factoring.c.
References BLOCK_FOR_INSN, block_label_after(), pattern_seq_def::insn, matching_seq_def::insn, IOR_REG_SET, seq_block_def::matching_seqs, matching_seq_def::next_matching_seq, and seq_block_def::next_seq_block.
Referenced by abstract_best_seq().
Definition at line 988 of file rtl-factoring.c.
References BB_END, BLOCK_FOR_INSN, block_label(), block_label_after(), dest, EDGE_ABNORMAL, EDGE_COUNT, EDGE_SUCC, emit_barrier_after(), emit_insn_after(), emit_jump_insn_after(), gen_indirect_jump(), gen_move_insn(), gen_symbol_ref_rtx_for_label(), basic_block_def::global_live_at_end, i, pattern_seq_def::insn, insn, seq_block_def::label, LABEL_PRESERVE_P, seq_block_def::length, pattern_seq_def::link_reg, make_edge(), seq_block_def::next_seq_block, prev_insn_in_block(), REGNO, remove_edge(), SET_REGNO_REG_SET, and split_block().
Referenced by abstract_best_seq().
Definition at line 851 of file rtl-factoring.c.
References matching_seq_def::abstracted_length, pattern_seq_def::abstracted_length, matching_seq_def::cost, erase_from_pattern_seqs(), pattern_seq_def::insn, matching_seq_def::insn, pattern_seq_def::matching_seqs, matching_seq_def::next_matching_seq, pattern_seq_def::next_pattern_seq, and seq_call_cost.
Referenced by rtl_seqabstr().
htab_t hash_buckets [static] |
Definition at line 255 of file rtl-factoring.c.
Referenced by CIO_RWTRAN::CICSE_Transform(), collect_pattern_seqs(), compute_rtx_cost(), fill_hash_bucket(), and rtl_seqabstr().
Initial value:
{
"seqabstr",
gate_rtl_seqabstr,
rest_of_rtl_seqabstr,
NULL,
NULL,
0,
TV_SEQABSTR,
0,
0,
0,
0,
TODO_dump_func |
TODO_ggc_collect,
'Q'
}
Definition at line 1433 of file rtl-factoring.c.
Referenced by init_optimization_passes().
pattern_seq pattern_seqs [static] |
Definition at line 258 of file rtl-factoring.c.
seq_block seq_blocks [static] |
Definition at line 261 of file rtl-factoring.c.
int seq_call_cost [static] |
Definition at line 264 of file rtl-factoring.c.
Referenced by compute_init_costs(), determine_seq_blocks(), erase_from_pattern_seqs(), match_seqs(), recompute_gain_for_pattern_seq(), and update_pattern_seqs().
int seq_jump_cost [static] |
Definition at line 267 of file rtl-factoring.c.
Referenced by compute_init_costs(), and recompute_gain_for_pattern_seq().
int seq_return_cost [static] |
Definition at line 270 of file rtl-factoring.c.
Referenced by compute_init_costs(), and recompute_gain_for_pattern_seq().
1.5.6