osprey/kg++fe/gnu/loop.c File Reference

#include "config.h"
#include "system.h"
#include "rtl.h"
#include "tm_p.h"
#include "function.h"
#include "expr.h"
#include "hard-reg-set.h"
#include "basic-block.h"
#include "insn-config.h"
#include "regs.h"
#include "recog.h"
#include "flags.h"
#include "real.h"
#include "loop.h"
#include "cselib.h"
#include "except.h"
#include "toplev.h"
#include "predict.h"
#include "insn-flags.h"
#include "optabs.h"

Include dependency graph for loop.c:

Go to the source code of this file.

Data Types

type  movable
type  rtx_pair
type  loop_replace_args
type  prefetch_info
type  check_store_data
type  combine_givs_stats
type  note_reg_stored_arg

Defines

#define SIMULTANEOUS_PREFETCHES   3
#define PREFETCH_BLOCK   32
#define HAVE_prefetch   0
#define CODE_FOR_prefetch   0
#define gen_prefetch(a, b, c)   (abort(), NULL_RTX)
#define MAX_PREFETCHES   100
#define PREFETCH_BLOCKS_BEFORE_LOOP_MAX   6
#define PREFETCH_BLOCKS_BEFORE_LOOP_MIN   2
#define PREFETCH_ONLY_DENSE_MEM   1
#define PREFETCH_DENSE_MEM   220
#define PREFETCH_NO_LOW_LOOPCNT   1
#define PREFETCH_LOW_LOOPCNT   32
#define PREFETCH_NO_CALL   1
#define PREFETCH_NO_EXTREME_STRIDE   1
#define PREFETCH_EXTREME_STRIDE   4096
#define PREFETCH_EXTREME_DIFFERENCE   4096
#define PREFETCH_BEFORE_LOOP   1
#define PREFETCH_NO_REVERSE_ORDER   1
#define PREFETCH_CONDITIONAL   1
#define LOOP_REG_LIFETIME(LOOP, REGNO)   ((REGNO_LAST_LUID (REGNO) - REGNO_FIRST_LUID (REGNO)))
#define LOOP_REG_GLOBAL_P(LOOP, REGNO)
#define LOOP_REGNO_NREGS(REGNO, SET_DEST)
#define INSN_IN_RANGE_P(INSN, START, END)
#define LOOP_BLOCK_NUM_1(INSN)   ((INSN) ? (BLOCK_FOR_INSN (INSN) ? BLOCK_NUM (INSN) : - 1) : -1)
#define LOOP_BLOCK_NUM(INSN)
#define LOOP_INSN_UID(INSN)   ((INSN) ? INSN_UID (INSN) : -1)

Functions/Subroutines

static void
invalidate_loops_containing_label 
PARAMS ((rtx))
static void find_and_verify_loops PARAMS ((rtx, struct loops *))
static void mark_loop_jump PARAMS ((rtx, struct loop *))
static void prescan_loop PARAMS ((struct loop *))
static int reg_in_basic_block_p PARAMS ((rtx, rtx))
static int consec_sets_invariant_p PARAMS ((const struct loop *, rtx, int, rtx))
static int labels_in_range_p PARAMS ((rtx, int))
static void count_one_set PARAMS ((struct loop_regs *, rtx, rtx, rtx *))
static void note_addr_stored PARAMS ((rtx, rtx, void *))
static int loop_reg_used_before_p PARAMS ((const struct loop *, rtx, rtx))
static void scan_loop PARAMS ((struct loop *, int))
static void ignore_some_movables PARAMS ((struct loop_movables *))
static void combine_movables PARAMS ((struct loop_movables *, struct loop_regs *))
static int num_unmoved_movables PARAMS ((const struct loop *))
static int regs_match_p PARAMS ((rtx, rtx, struct loop_movables *))
static int rtx_equal_for_loop_p PARAMS ((rtx, rtx, struct loop_movables *, struct loop_regs *))
static void move_movables PARAMS ((struct loop *loop, struct loop_movables *, int, int))
static void loop_movables_add PARAMS ((struct loop_movables *, struct movable *))
static int count_nonfixed_reads PARAMS ((const struct loop *, rtx))
static int loop_biv_eliminable_p PARAMS ((struct loop *, struct iv_class *, int, int))
static int loop_giv_reduce_benefit PARAMS ((struct loop *, struct iv_class *, struct induction *, rtx))
static void loop_givs_dead_check PARAMS ((struct loop *, struct iv_class *))
static void loop_givs_rescan PARAMS ((struct loop *, struct iv_class *, rtx *))
static void find_single_use_in_loop PARAMS ((struct loop_regs *, rtx, rtx))
static int valid_initial_value_p PARAMS ((rtx, rtx, int, rtx))
static void find_mem_givs PARAMS ((const struct loop *, rtx, rtx, int, int))
static void record_biv PARAMS ((struct loop *, struct induction *, rtx, rtx, rtx, rtx, rtx *, int, int))
static void check_final_value PARAMS ((const struct loop *, struct induction *))
static void loop_ivs_dump PARAMS ((const struct loop *, FILE *, int))
static void loop_iv_class_dump PARAMS ((const struct iv_class *, FILE *, int))
static void loop_biv_dump PARAMS ((const struct induction *, FILE *, int))
static void record_giv PARAMS ((const struct loop *, struct induction *, rtx, rtx, rtx, rtx, rtx, rtx, int, enum g_types, int, int, rtx *))
static void
check_ext_dependent_givs 
PARAMS ((struct iv_class *, struct loop_info *))
static int basic_induction_var PARAMS ((const struct loop *, rtx, enum machine_mode, rtx, rtx, rtx *, rtx *, rtx **))
static rtx simplify_giv_expr PARAMS ((const struct loop *, rtx, rtx *, int *))
static int general_induction_var PARAMS ((const struct loop *loop, rtx, rtx *, rtx *, rtx *, rtx *, int, int *, enum machine_mode))
static int consec_sets_giv PARAMS ((const struct loop *, int, rtx, rtx, rtx, rtx *, rtx *, rtx *, rtx *))
static rtx express_from_1 PARAMS ((rtx, rtx, rtx))
static rtx combine_givs_p PARAMS ((struct induction *, struct induction *))
static int cmp_combine_givs_stats PARAMS ((const PTR, const PTR))
static void combine_givs PARAMS ((struct loop_regs *, struct iv_class *))
static int maybe_eliminate_biv PARAMS ((const struct loop *, struct iv_class *, int, int, int))
static int maybe_eliminate_biv_1 PARAMS ((const struct loop *, rtx, rtx, struct iv_class *, int, basic_block, rtx))
static void loop_regs_scan PARAMS ((const struct loop *, int))
static int find_mem_in_note_1 PARAMS ((rtx *, void *))
static void replace_loop_mems PARAMS ((rtx, rtx, rtx, int))
static void replace_loop_regs PARAMS ((rtx insn, rtx, rtx))
static void try_copy_prop PARAMS ((const struct loop *, rtx, unsigned int))
static rtx check_insn_for_givs PARAMS ((struct loop *, rtx, int, int))
static rtx gen_add_mult PARAMS ((rtx, rtx, rtx, rtx))
static rtx loop_insn_emit_after PARAMS ((const struct loop *, basic_block, rtx, rtx))
static HOST_WIDE_INT
remove_constant_addition 
PARAMS ((rtx *))
void debug_iv_class PARAMS ((const struct iv_class *))
void debug_biv PARAMS ((const struct induction *))
void debug_loops PARAMS ((const struct loops *))
static int compute_luids PARAMS ((rtx, rtx, int))
static int
biv_elimination_giv_has_0_offset 
PARAMS ((struct induction *, struct induction *, rtx))
void init_loop ()
static int compute_luids (rtx start, rtx end, int prev_luid)
void loop_optimize (rtx f, FILE *dumpfile, int flags)
static rtx next_insn_in_loop (struct loop *loop, rtx insn) const
static void scan_loop (struct loop *loop, int flags)
void record_excess_regs (rtx in_this, rtx not_in_this, rtx *output)
rtx libcall_other_reg (rtx insn, rtx equiv)
static int reg_in_basic_block_p (rtx insn, rtx reg)
static int libcall_benefit (rtx last)
static rtx skip_consec_insns (rtx insn, int count)
static void ignore_some_movables (struct loop_movables *movables)
static void force_movables (struct loop_movables *movables)
static void combine_movables (struct loop_movables *movables, struct loop_regs *regs)
static int num_unmoved_movables (struct loop *loop) const
static int regs_match_p (rtx x, rtx y, struct loop_movables *movables)
static int rtx_equal_for_loop_p (rtx x, rtx y, struct loop_movables *movables, struct loop_regs *regs)
static void add_label_notes (rtx x, rtx insns)
static void move_movables (struct loop *loop, struct loop_movables *movables, int threshold, int insn_count)
static void loop_movables_add (struct loop_movables *movables, struct movable *m)
static void loop_movables_free (struct loop_movables *movables)
static int count_nonfixed_reads (struct loop *loop, rtx x) const
static void prescan_loop (struct loop *loop)
static void invalidate_loops_containing_label (rtx label)
static void find_and_verify_loops (rtx f, struct loops *loops)
static void mark_loop_jump (rtx x, struct loop *loop)
static int labels_in_range_p (rtx insn, int end)
static void note_addr_stored (rtx x, y, data)
static void note_set_pseudo_multiple_uses (rtx x, y, void *data)
int loop_invariant_p (struct loop *loop, rtx x) const
static int consec_sets_invariant_p (struct loop *loop, rtx reg, int n_sets, rtx insn) const
static void find_single_use_in_loop (struct loop_regs *regs, rtx insn, rtx x)
static void count_one_set (struct loop_regs *regs, rtx insn, rtx x, rtx *last_set)
static int loop_reg_used_before_p (struct loop *loop, rtx set, rtx insn) const
static void check_store (rtx x, pat, void *data)
static int rtx_equal_for_prefetch_p (rtx x, rtx y)
static HOST_WIDE_INT remove_constant_addition (rtx *x)
static void emit_prefetch_instructions (struct loop *loop)
void for_each_insn_in_loop (struct loop *loop, loop_insn_callback fncall)
static void loop_bivs_find (struct loop *loop)
static void loop_bivs_init_find (struct loop *loop)
static void loop_bivs_check (struct loop *loop)
static void loop_givs_find (struct loop *loop)
static void loop_givs_check (struct loop *loop)
static int loop_biv_eliminable_p (struct loop *loop, struct iv_class *bl, int threshold, int insn_count)
static void loop_givs_reduce (struct loop *loop, struct iv_class *bl)
static void loop_givs_dead_check (loop, struct iv_class *bl)
static void loop_givs_rescan (struct loop *loop, struct iv_class *bl, rtx *reg_map)
static int loop_giv_reduce_benefit (loop, struct iv_class *bl, struct induction *v, rtx test_reg)
static void loop_ivs_free (struct loop *loop)
static void strength_reduce (struct loop *loop, int flags)
static rtx check_insn_for_bivs (struct loop *loop, rtx p, int not_every_iteration, int maybe_multiple)
static rtx check_insn_for_givs (struct loop *loop, rtx p, int not_every_iteration, int maybe_multiple)
static int valid_initial_value_p (rtx x, rtx insn, int call_seen, rtx loop_start)
static void find_mem_givs (struct loop *loop, rtx x, rtx insn, int not_every_iteration, int maybe_multiple) const
static void record_biv (struct loop *loop, struct induction *v, rtx insn, rtx dest_reg, rtx inc_val, rtx mult_val, rtx *location, int not_every_iteration, int maybe_multiple)
static void record_giv (struct loop *loop, struct induction *v, rtx insn, rtx src_reg, rtx dest_reg, rtx mult_val, rtx add_val, rtx ext_val, int benefit, enum g_types type, int not_every_iteration, int maybe_multiple, rtx *location) const
static void check_final_value (struct loop *loop, struct induction *v) const
static void update_giv_derive (struct loop *loop, rtx p) const
static int basic_induction_var (struct loop *loop, rtx x, enum machine_mode mode, rtx dest_reg, rtx p, rtx *inc_val, rtx *mult_val, rtx **location) const
static int general_induction_var (struct loop *loop, rtx x, rtx *src_reg, rtx *add_val, rtx *mult_val, rtx *ext_val, int is_addr, int *pbenefit, enum machine_mode addr_mode) const
static rtx sge_plus PARAMS ((enum machine_mode, rtx, rtx))
static rtx simplify_giv_expr (struct loop *loop, rtx x, rtx *ext_val, int *benefit) const
static rtx sge_plus_constant (rtx x, rtx c)
static rtx sge_plus (enum machine_mode mode, rtx x, rtx y)
static int consec_sets_giv (struct loop *loop, int first_benefit, rtx p, rtx src_reg, rtx dest_reg, rtx *add_val, rtx *mult_val, rtx *ext_val, rtx *last_consec_insn) const
static rtx express_from_1 (rtx a, rtx b, rtx mult)
rtx express_from (struct induction *g1, struct induction *g2)
static rtx combine_givs_p (struct induction *g1, struct induction *g2)
static void check_ext_dependent_givs (struct iv_class *bl, struct loop_info *loop_info)
rtx extend_value_for_giv (struct induction *v, rtx value)
static int cmp_combine_givs_stats (PTR xp, const PTR yp) const
static void combine_givs (struct loop_regs *regs, struct iv_class *bl)
static rtx gen_add_mult (rtx b, rtx m, rtx a, rtx reg)
static void loop_regs_update (loop, rtx seq) const
void loop_iv_add_mult_emit_before (struct loop *loop, rtx b, rtx m, rtx a, rtx reg, basic_block before_bb, rtx before_insn) const
void loop_iv_add_mult_sink (struct loop *loop, rtx b, rtx m, rtx a, rtx reg) const
void loop_iv_add_mult_hoist (struct loop *loop, rtx b, rtx m, rtx a, rtx reg) const
static int iv_add_mult_cost (rtx b, rtx m, rtx a, rtx reg)
static int product_cheap_p (rtx a, rtx b)
static int check_dbra_loop (struct loop *loop, int insn_count)
static int maybe_eliminate_biv (struct loop *loop, struct iv_class *bl, int eliminate_p, int threshold, int insn_count) const
int loop_insn_first_p (rtx insn, rtx reference)
static int biv_elimination_giv_has_0_offset (struct induction *biv, struct induction *giv, rtx insn)
static int maybe_eliminate_biv_1 (struct loop *loop, rtx x, rtx insn, struct iv_class *bl, int eliminate_p, basic_block where_bb, rtx where_insn) const
static int last_use_this_basic_block (rtx reg, rtx insn)
static void record_initial (rtx dest, rtx set, data)
static void update_reg_last_use (rtx x, rtx insn)
rtx canonicalize_condition (rtx insn, rtx cond, int reverse, rtx *earliest, rtx want_reg)
rtx get_condition (rtx jump, rtx *earliest)
rtx get_condition_for_loop (struct loop *loop, rtx x) const
static int indirect_jump_in_function_p (rtx start)
static int insert_loop_mem (rtx *mem, data)
static void loop_regs_scan (struct loop *loop, int extra_size) const
static int count_insns_in_loop (struct loop *loop) const
static void load_mems (struct loop *loop) const
static void note_reg_stored (rtx x, setter, void *arg)
static void try_copy_prop (struct loop *loop, rtx replacement, unsigned int regno) const
static void loop_delete_insns (rtx first, rtx last)
static void try_swap_copy_prop (struct loop *loop, rtx replacement, unsigned int regno) const
static int find_mem_in_note_1 (rtx *x, void *data)
static rtx find_mem_in_note (rtx note)
static int replace_loop_mem (rtx *mem, void *data)
static void replace_loop_mems (rtx insn, rtx mem, rtx reg, int written)
static int replace_loop_reg (rtx *px, void *data)
static void replace_loop_regs (rtx insn, rtx reg, rtx replacement)
static int replace_label (rtx *x, void *data)
static rtx loop_insn_emit_after (loop, where_bb, rtx where_insn, rtx pattern) const
rtx loop_insn_emit_before (struct loop *loop, where_bb, rtx where_insn, rtx pattern) const
static rtx loop_call_insn_emit_before (loop, where_bb, rtx where_insn, rtx pattern) const
rtx loop_insn_hoist (struct loop *loop, rtx pattern) const
static rtx loop_call_insn_hoist (struct loop *loop, rtx pattern) const
rtx loop_insn_sink (struct loop *loop, rtx pattern) const
static rtx gen_load_of_final_value (rtx reg, rtx final_value)
static rtx loop_insn_sink_or_swim (struct loop *loop, rtx pattern) const
static void loop_ivs_dump (struct loop *loop, FILE *file, int verbose) const
static void loop_iv_class_dump (struct iv_class *bl, FILE *file, verbose) const
static void loop_biv_dump (struct induction *v, FILE *file, int verbose) const
static void loop_giv_dump (struct induction *v, FILE *file, int verbose) const
void debug_ivs (struct loop *loop) const
void debug_iv_class (struct iv_class *bl) const
void debug_biv (struct induction *v) const
void debug_giv (struct induction *v) const
static void loop_dump_aux (struct loop *loop, FILE *file, verbose) const
void debug_loop (struct loop *loop) const
void debug_loops (struct loops *loops) const

Variables

int * uid_luid
struct loop ** uid_loop
int max_uid_for_loop
static int max_luid
static int max_loop_num
unsigned int max_reg_before_loop
static int loop_max_reg
FILEloop_dump_stream
static int indirect_jump_in_function
static int copy_cost
static int reg_address_cost
static rtx note_insn
static rtx addr_placeholder


Define Documentation

#define CODE_FOR_prefetch   0

Definition at line 67 of file loop.c.

Referenced by emit_prefetch_instructions(), and expand_builtin_prefetch().

#define gen_prefetch ( a,
b,
c   )     (abort(), NULL_RTX)

Definition at line 68 of file loop.c.

Referenced by emit_prefetch_instructions(), and expand_builtin_prefetch().

#define HAVE_prefetch   0

Definition at line 66 of file loop.c.

#define INSN_IN_RANGE_P ( INSN,
START,
END   ) 

Value:

(INSN_UID (INSN) < max_uid_for_loop   \
   && INSN_LUID (INSN) >= INSN_LUID (START) \
   && INSN_LUID (INSN) <= INSN_LUID (END))

Definition at line 380 of file loop.c.

Referenced by scan_loop().

#define LOOP_BLOCK_NUM ( INSN   ) 

Value:

((INSN) ? (GET_CODE (INSN) == NOTE \
            ? LOOP_BLOCK_NUM_1 (next_nonnote_insn (INSN)) \
            : LOOP_BLOCK_NUM_1 (INSN)) \
        : -1)

Definition at line 10912 of file loop.c.

Referenced by loop_dump_aux().

#define LOOP_BLOCK_NUM_1 ( INSN   )     ((INSN) ? (BLOCK_FOR_INSN (INSN) ? BLOCK_NUM (INSN) : - 1) : -1)

Definition at line 10908 of file loop.c.

#define LOOP_INSN_UID ( INSN   )     ((INSN) ? INSN_UID (INSN) : -1)

Definition at line 10918 of file loop.c.

Referenced by loop_dump_aux().

#define LOOP_REG_GLOBAL_P ( LOOP,
REGNO   ) 

Value:

Definition at line 148 of file loop.c.

Referenced by scan_loop().

#define LOOP_REG_LIFETIME ( LOOP,
REGNO   )     ((REGNO_LAST_LUID (REGNO) - REGNO_FIRST_LUID (REGNO)))

Definition at line 145 of file loop.c.

Referenced by record_giv(), and scan_loop().

#define LOOP_REGNO_NREGS ( REGNO,
SET_DEST   ) 

Value:

Definition at line 152 of file loop.c.

Referenced by count_one_set(), move_movables(), and scan_loop().

#define MAX_PREFETCHES   100

Definition at line 74 of file loop.c.

#define PREFETCH_BEFORE_LOOP   1

Definition at line 132 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_BLOCK   32

Definition at line 63 of file loop.c.

#define PREFETCH_BLOCKS_BEFORE_LOOP_MAX   6

Definition at line 77 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_BLOCKS_BEFORE_LOOP_MIN   2

Definition at line 80 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_CONDITIONAL   1

Definition at line 142 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_DENSE_MEM   220

Definition at line 94 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_EXTREME_DIFFERENCE   4096

Definition at line 126 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_EXTREME_STRIDE   4096

Definition at line 120 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_LOW_LOOPCNT   32

Definition at line 104 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_NO_CALL   1

Definition at line 110 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_NO_EXTREME_STRIDE   1

Definition at line 115 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_NO_LOW_LOOPCNT   1

Definition at line 99 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_NO_REVERSE_ORDER   1

Definition at line 137 of file loop.c.

Referenced by emit_prefetch_instructions().

#define PREFETCH_ONLY_DENSE_MEM   1

Definition at line 88 of file loop.c.

Referenced by emit_prefetch_instructions().

#define SIMULTANEOUS_PREFETCHES   3

Definition at line 60 of file loop.c.


Function Documentation

static void add_label_notes ( rtx  x,
rtx  insns 
) [static]

static int basic_induction_var ( struct loop loop,
rtx  x,
enum machine_mode  mode,
rtx  dest_reg,
rtx  p,
rtx inc_val,
rtx mult_val,
rtx **  location 
) const [static]

static int biv_elimination_giv_has_0_offset ( struct induction biv,
struct induction giv,
rtx  insn 
) [static]

Definition at line 8781 of file loop.c.

References loop_insn_first_p().

Referenced by maybe_eliminate_biv_1().

rtx canonicalize_condition ( rtx  insn,
rtx  cond,
int  reverse,
rtx earliest,
rtx  want_reg 
)

static int check_dbra_loop ( struct loop loop,
int  insn_count 
) [static]

Definition at line 8075 of file loop.c.

References add_insn(), induction::add_val, iv_class::biv, iv_class::biv_count, bl, loop_info::comparison_code, loop_info::comparison_value, condjump_label(), const0_rtx, count_nonfixed_reads(), delete_insn(), delete_related_insns(), DEST_REG, induction::dest_reg, emit_cmp_and_jump_insns(), emit_jump_insn_before(), end_sequence(), expand_inc(), loop_info::final_equiv_value, loop_info::final_value, iv_class::final_value, find_reg_note(), loop_info::first_loop_store_insn, fprintf(), GE, gen_add3_insn(), GEN_INT, gen_load_of_final_value(), gen_move_insn(), gen_rtx_EXPR_LIST, gen_rtx_MINUS, gen_rtx_PLUS, gen_sub3_insn(), GENERAL_INDUCT, GET_CODE, get_condition(), get_condition_for_loop(), get_insns(), GET_MODE, GET_MODE_BITSIZE, iv_class::giv, iv_class::giv_count, induction::giv_type, GT, loop_info::has_multiple_exit_targets, loop_info::has_nonconst_call, loop_info::has_prefetch, loop_info::has_volatile, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, loop_info::increment, iv_class::init_insn, iv_class::init_set, loop_info::initial_equiv_value, loop_info::initial_value, iv_class::initial_value, induction::insn, INSN_P, INSN_UID, INTVAL, jump, JUMP_LABEL, LABEL_NUSES, LE, loop_ivs::list, loop_dump_stream, LOOP_INFO, loop_insn_emit_before(), loop_insn_first_p(), loop_insn_hoist(), loop_insn_sink(), loop_invariant_p(), LOOP_IVS, LOOP_REGS, LT, induction::maybe_multiple, mode, loop_regs::multiple_uses, loop_ivs::n_regs, NE, iv_class::next, NEXT_INSN, induction::next_iv, iv_class::nonneg, note_set_pseudo_multiple_uses(), note_stores(), NULL_RTX, loop_info::num_mem_sets, num_unmoved_movables(), offset, onlyjump_p(), PATTERN, PREV_INSN, prev_nonnote_insn(), REG, REG_EQUAL, REG_IV_INFO, REG_IV_TYPE, reg_mentioned_p(), REG_NONNEG, REG_NOTE_KIND, REG_NOTES, reg_set_between_p(), reg_used_between_p(), iv_class::regno, REGNO, REGNO_FIRST_UID, REGNO_LAST_UID, regno_reg_rtx, regs, iv_class::reversed, SET_DEST, SET_SRC, single_set, induction::src_reg, start_sequence(), and XEXP.

Referenced by strength_reduce().

static void check_ext_dependent_givs ( struct iv_class bl,
struct loop_info loop_info 
) [static]

static void check_final_value ( struct loop loop,
struct induction v 
) const [static]

static rtx check_insn_for_bivs ( struct loop loop,
rtx  p,
int  not_every_iteration,
int  maybe_multiple 
) [static]

static rtx check_insn_for_givs ( struct loop loop,
rtx  p,
int  not_every_iteration,
int  maybe_multiple 
) [static]

static void check_store ( rtx  x,
pat  ,
void data 
) [static]

static int cmp_combine_givs_stats ( PTR  xp,
const PTR  yp 
) const [static]

Definition at line 7618 of file loop.c.

References d, combine_givs_stats::giv_number, combine_givs_stats::total_benefit, and is::y.

Referenced by combine_givs().

static void combine_givs ( struct loop_regs regs,
struct iv_class bl 
) [static]

static rtx combine_givs_p ( struct induction g1,
struct induction g2 
) [static]

static void combine_movables ( struct loop_movables movables,
struct loop_regs regs 
) [static]

static int compute_luids ( rtx  start,
rtx  end,
int  prev_luid 
) [static]

Definition at line 418 of file loop.c.

References GET_CODE, i, insn, INSN_UID, max_uid_for_loop, NEXT_INSN, NOTE_LINE_NUMBER, and uid_luid.

Referenced by find_and_verify_loops(), and loop_optimize().

static int consec_sets_giv ( struct loop loop,
int  first_benefit,
rtx  p,
rtx  src_reg,
rtx  dest_reg,
rtx add_val,
rtx mult_val,
rtx ext_val,
rtx last_consec_insn 
) const [static]

static int consec_sets_invariant_p ( struct loop loop,
rtx  reg,
int  n_sets,
rtx  insn 
) const [static]

static int count_insns_in_loop ( struct loop loop  )  const [static]

Definition at line 9813 of file loop.c.

References count, INSN_P, and NEXT_INSN.

Referenced by scan_loop(), and strength_reduce().

static int count_nonfixed_reads ( struct loop loop,
rtx  x 
) const [static]

Definition at line 2400 of file loop.c.

References CONST, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, loop_invariant_p(), MEM, PC, REG, XEXP, XVECEXP, and XVECLEN.

Referenced by check_dbra_loop(), and count_nonfixed_reads().

static void count_one_set ( struct loop_regs regs,
rtx  insn,
rtx  x,
rtx last_set 
) [static]

Definition at line 3515 of file loop.c.

References dest, GET_CODE, if(), LOOP_REGNO_NREGS, REG, reg_used_between_p(), REGNO, SET, SET_DEST, and XEXP.

Referenced by loop_regs_scan().

void debug_biv ( struct induction v  )  const

Definition at line 10893 of file loop.c.

References loop_biv_dump().

void debug_giv ( struct induction v  )  const

Definition at line 10901 of file loop.c.

References loop_giv_dump().

void debug_iv_class ( struct iv_class bl  )  const

Definition at line 10885 of file loop.c.

References loop_iv_class_dump().

void debug_ivs ( struct loop loop  )  const

Definition at line 10877 of file loop.c.

References loop_ivs_dump().

void debug_loop ( struct loop loop  )  const

Definition at line 10988 of file loop.c.

References flow_loop_dump(), and loop_dump_aux().

void debug_loops ( struct loops loops  )  const

Definition at line 10997 of file loop.c.

References flow_loops_dump(), and loop_dump_aux().

static void emit_prefetch_instructions ( struct loop loop  )  [static]

Definition at line 3791 of file loop.c.

References induction::add_val, address, induction::always_executed, prefetch_info::base_address, iv_class::biv, bl, prefetch_info::bytes_accessed, check_insn_for_givs(), check_store(), prefetch_info::class, CODE_FOR_prefetch, const1_rtx, CONSTANT_P, convert_to_mode(), copy_rtx(), DEST_ADDR, emit_insn(), emit_insn_before(), end_sequence(), force_reg(), fprintf(), GEN_INT, gen_prefetch, gen_reg_rtx(), GET_CODE, get_insns(), GET_MODE, GET_MODE_SIZE, prefetch_info::giv, iv_class::giv, induction::giv_type, HAVE_prefetch, HOST_WIDE_INT, HOST_WIDE_INT_PRINT_DEC, prefetch_info::index, index(), iv_class::initial_value, induction::insn, INSN_UID, INTVAL, loop_ivs::list, induction::location, loop_dump_stream, LOOP_INFO, loop_insn_emit_before(), loop_invariant_p(), loop_iv_add_mult_emit_before(), LOOP_IVS, induction::maybe_multiple, check_store_data::mem_address, check_store_data::mem_write, mode, induction::mult_val, n, iv_class::next, NEXT_INSN, induction::next_iv, note_stores(), NULL, offsettable_address_p(), PATTERN, PLUS, plus_constant, Pmode, PREFETCH_BEFORE_LOOP, prefetch_info::prefetch_before_loop, PREFETCH_BLOCK, PREFETCH_BLOCKS_BEFORE_LOOP_MAX, PREFETCH_BLOCKS_BEFORE_LOOP_MIN, PREFETCH_CONDITIONAL, PREFETCH_DENSE_MEM, PREFETCH_EXTREME_DIFFERENCE, PREFETCH_EXTREME_STRIDE, prefetch_info::prefetch_in_loop, PREFETCH_LOW_LOOPCNT, PREFETCH_NO_CALL, PREFETCH_NO_EXTREME_STRIDE, PREFETCH_NO_LOW_LOOPCNT, PREFETCH_NO_REVERSE_ORDER, PREFETCH_ONLY_DENSE_MEM, PREV_INSN, prev_insn, print_rtl(), REGNO, remove_constant_addition(), rtx_equal_for_prefetch_p(), simplify_gen_binary(), SIMULTANEOUS_PREFETCHES, size, induction::src_reg, start_sequence(), prefetch_info::stride, stride, prefetch_info::total_bytes, write, prefetch_info::write, and is::y.

Referenced by strength_reduce().

rtx express_from ( struct induction g1,
struct induction g2 
)

static rtx express_from_1 ( rtx  a,
rtx  b,
rtx  mult 
) [static]

static rtx extend_value_for_giv ( struct induction v,
rtx  value 
)

static void find_and_verify_loops ( rtx  f,
struct loops loops 
) [static]

static void find_mem_givs ( struct loop loop,
rtx  x,
rtx  insn,
int  not_every_iteration,
int  maybe_multiple 
) const [static]

static rtx find_mem_in_note ( rtx  note  )  [static]

Definition at line 10437 of file loop.c.

References find_mem_in_note_1(), for_each_rtx(), and NULL_RTX.

Referenced by replace_loop_mems().

static int find_mem_in_note_1 ( rtx x,
void data 
) [static]

Definition at line 10421 of file loop.c.

References GET_CODE, MEM, and NULL_RTX.

Referenced by find_mem_in_note().

static void find_single_use_in_loop ( struct loop_regs regs,
rtx  insn,
rtx  x 
) [static]

void for_each_insn_in_loop ( struct loop loop,
loop_insn_callback  fncall 
)

static void force_movables ( struct loop_movables movables  )  [static]

static rtx gen_add_mult ( rtx  b,
rtx  m,
rtx  a,
rtx  reg 
) [static]

static rtx gen_load_of_final_value ( rtx  reg,
rtx  final_value 
) [static]

static int general_induction_var ( struct loop loop,
rtx  x,
rtx src_reg,
rtx add_val,
rtx mult_val,
rtx ext_val,
int  is_addr,
int *  pbenefit,
enum machine_mode  addr_mode 
) const [static]

rtx get_condition ( rtx  jump,
rtx earliest 
)

rtx get_condition_for_loop ( struct loop loop,
rtx  x 
) const

static void ignore_some_movables ( struct loop_movables movables  )  [static]

Definition at line 1392 of file loop.c.

References movable::done, find_reg_note(), movable::insn, movable::next, NEXT_INSN, NULL_RTX, REG_RETVAL, and XEXP.

Referenced by scan_loop().

static int indirect_jump_in_function_p ( rtx  start  )  [static]

Definition at line 9589 of file loop.c.

References computed_jump_p(), and NEXT_INSN.

Referenced by loop_optimize().

void init_loop ( void   ) 

Definition at line 403 of file loop.c.

Referenced by backend_init(), Create_Initialize_Loop(), and Parallelize_Doacross_Loop().

static int insert_loop_mem ( rtx mem,
data   
) [static]

static void invalidate_loops_containing_label ( rtx  label  )  [static]

Definition at line 2642 of file loop.c.

References INSN_UID, loop::invalid, and loop::outer.

Referenced by find_and_verify_loops().

static int iv_add_mult_cost ( rtx  b,
rtx  m,
rtx  a,
rtx  reg 
) [static]

static int labels_in_range_p ( rtx  insn,
int  end 
) [static]

Definition at line 3141 of file loop.c.

References GET_CODE, INSN_LUID, and NEXT_INSN.

Referenced by scan_loop().

static int last_use_this_basic_block ( rtx  reg,
rtx  insn 
) [static]

Definition at line 9186 of file loop.c.

References GET_CODE, INSN_UID, n, NEXT_INSN, REGNO, and REGNO_LAST_UID.

Referenced by check_final_value(), and record_giv().

static int libcall_benefit ( rtx  last  )  [static]

static rtx libcall_other_reg ( rtx  insn,
rtx  equiv 
)

Definition at line 1260 of file loop.c.

Referenced by scan_loop().

static void load_mems ( struct loop loop  )  const [static]

static void loop_biv_dump ( struct induction v,
FILE file,
int  verbose 
) const [static]

Definition at line 10787 of file loop.c.

References fprintf(), fputc(), INSN_UID, print_simple_rtl(), and REGNO.

Referenced by debug_biv(), and record_biv().

static int loop_biv_eliminable_p ( struct loop loop,
struct iv_class bl,
int  threshold,
int  insn_count 
) [static]

static void loop_bivs_check ( struct loop loop  )  [static]

static void loop_bivs_find ( struct loop loop  )  [static]

static void loop_bivs_init_find ( struct loop loop  )  [static]

static rtx loop_call_insn_emit_before ( loop  ,
where_bb  ,
rtx  where_insn,
rtx  pattern 
) const [static]

Definition at line 10622 of file loop.c.

References emit_call_insn_before().

Referenced by loop_call_insn_hoist().

static rtx loop_call_insn_hoist ( struct loop loop,
rtx  pattern 
) const [static]

Definition at line 10646 of file loop.c.

References loop_call_insn_emit_before().

Referenced by move_movables().

static void loop_delete_insns ( rtx  first,
rtx  last 
) [static]

Definition at line 10311 of file loop.c.

References delete_insn(), fprintf(), INSN_UID, loop_dump_stream, and NEXT_INSN.

Referenced by try_copy_prop().

static void loop_dump_aux ( struct loop loop,
FILE file,
verbose   
) const [static]

static void loop_giv_dump ( struct induction v,
FILE file,
int  verbose 
) const [static]

Definition at line 10813 of file loop.c.

References abort, DEST_REG, fprintf(), fputc(), GET_CODE, INSN_UID, print_simple_rtl(), REGNO, SIGN_EXTEND, and TRUNCATE.

Referenced by debug_giv(), and record_giv().

static int loop_giv_reduce_benefit ( loop  ,
struct iv_class bl,
struct induction v,
rtx  test_reg 
) [static]

static void loop_givs_check ( struct loop loop  )  [static]

static void loop_givs_dead_check ( loop  ,
struct iv_class bl 
) [static]

static void loop_givs_find ( struct loop loop  )  [static]

Definition at line 4592 of file loop.c.

References check_insn_for_givs(), and for_each_insn_in_loop().

Referenced by strength_reduce().

static void loop_givs_reduce ( struct loop loop,
struct iv_class bl 
) [static]

static void loop_givs_rescan ( struct loop loop,
struct iv_class bl,
rtx reg_map 
) [static]

static rtx loop_insn_emit_after ( loop  ,
where_bb  ,
rtx  where_insn,
rtx  pattern 
) const [static]

Definition at line 10591 of file loop.c.

References emit_insn_after().

Referenced by load_mems(), loop_givs_rescan(), and move_movables().

rtx loop_insn_emit_before ( struct loop loop,
where_bb  ,
rtx  where_insn,
rtx  pattern 
) const

static int loop_insn_first_p ( rtx  insn,
rtx  reference 
)

rtx loop_insn_hoist ( struct loop loop,
rtx  pattern 
) const

rtx loop_insn_sink ( struct loop loop,
rtx  pattern 
) const

static rtx loop_insn_sink_or_swim ( struct loop loop,
rtx  pattern 
) const [static]

Definition at line 10686 of file loop.c.

References loop_insn_hoist(), and loop_insn_sink().

Referenced by loop_givs_rescan(), and strength_reduce().

int loop_invariant_p ( struct loop loop,
rtx  x 
) const

void loop_iv_add_mult_emit_before ( struct loop loop,
rtx  b,
rtx  m,
rtx  a,
rtx  reg,
basic_block  before_bb,
rtx  before_insn 
) const

void loop_iv_add_mult_hoist ( struct loop loop,
rtx  b,
rtx  m,
rtx  a,
rtx  reg 
) const

void loop_iv_add_mult_sink ( struct loop loop,
rtx  b,
rtx  m,
rtx  a,
rtx  reg 
) const

static void loop_iv_class_dump ( struct iv_class bl,
FILE file,
verbose   
) const [static]

static void loop_ivs_dump ( struct loop loop,
FILE file,
int  verbose 
) const [static]

Definition at line 10697 of file loop.c.

References bl, fprintf(), fputc(), loop_iv_class_dump(), LOOP_IVS, and iv_class::next.

Referenced by debug_ivs().

static void loop_ivs_free ( struct loop loop  )  [static]

static void loop_movables_add ( struct loop_movables movables,
struct movable m 
) [static]

Definition at line 2306 of file loop.c.

References movable::next.

Referenced by scan_loop().

static void loop_movables_free ( struct loop_movables movables  )  [static]

Definition at line 2319 of file loop.c.

References free(), and movable::next.

Referenced by scan_loop().

void loop_optimize ( rtx  f,
FILE dumpfile,
int  flags 
)

Definition at line 447 of file loop.c.

Referenced by rest_of_compilation(), and rest_of_handle_loop_optimize().

static int loop_reg_used_before_p ( struct loop loop,
rtx  set,
rtx  insn 
) const [static]

Definition at line 3570 of file loop.c.

References INSN_P, NEXT_INSN, PATTERN, reg_overlap_mentioned_p(), and SET_DEST.

Referenced by scan_loop().

static void loop_regs_scan ( struct loop loop,
int  extra_size 
) const [static]

static void loop_regs_update ( loop  ,
rtx  seq 
) const [static]

static void mark_loop_jump ( rtx  x,
struct loop loop 
) [static]

static int maybe_eliminate_biv ( struct loop loop,
struct iv_class bl,
int  eliminate_p,
int  threshold,
int  insn_count 
) const [static]

static int maybe_eliminate_biv_1 ( struct loop loop,
rtx  x,
rtx  insn,
struct iv_class bl,
int  eliminate_p,
basic_block  where_bb,
rtx  where_insn 
) const [static]

static void move_movables ( struct loop loop,
struct loop_movables movables,
int  threshold,
int  insn_count 
) [static]

static rtx next_insn_in_loop ( struct loop loop,
rtx  insn 
) const [static]

Definition at line 574 of file loop.c.

References NEXT_INSN, and NULL_RTX.

Referenced by for_each_insn_in_loop(), load_mems(), scan_loop(), try_copy_prop(), and try_swap_copy_prop().

static void note_addr_stored ( rtx  x,
,
data   
) [static]

static void note_reg_stored ( rtx  x,
setter  ,
void arg 
) [static]

Definition at line 10196 of file loop.c.

References note_reg_stored_arg::reg, and note_reg_stored_arg::set_seen.

Referenced by try_copy_prop().

static void note_set_pseudo_multiple_uses ( rtx  x,
,
void data 
) [static]

static int num_unmoved_movables ( struct loop loop  )  const [static]

Definition at line 1589 of file loop.c.

References movable::done, LOOP_MOVABLES, and movable::next.

Referenced by check_dbra_loop().

static rtx sge_plus PARAMS ( (enum machine_mode, rtx, rtx  )  [static]

static int biv_elimination_giv_has_0_offset PARAMS ( (struct induction *, struct induction *, rtx  )  [static]

static int compute_luids PARAMS ( (rtx, rtx, int)   )  [static]

void debug_loops PARAMS ( (const struct loops *)   ) 

void debug_biv PARAMS ( (const struct induction *)   ) 

void debug_iv_class PARAMS ( (const struct iv_class *)   ) 

static HOST_WIDE_INT remove_constant_addition PARAMS ( (rtx *)   )  [static]

static rtx loop_insn_emit_after PARAMS ( (const struct loop *, basic_block, rtx, rtx  )  [static]

static rtx gen_add_mult PARAMS ( (rtx, rtx, rtx, rtx  )  [static]

static rtx check_insn_for_givs PARAMS ( (struct loop *, rtx, int, int)   )  [static]

static void try_copy_prop PARAMS ( (const struct loop *, rtx, unsigned int)   )  [static]

static void replace_loop_regs PARAMS ( (rtx insn, rtx, rtx  )  [static]

static void replace_loop_mems PARAMS ( (rtx, rtx, rtx, int)   )  [static]

static int find_mem_in_note_1 PARAMS ( (rtx *, void *)   )  [static]

static void loop_regs_scan PARAMS ( (const struct loop *, int)   )  [static]

static int maybe_eliminate_biv_1 PARAMS ( (const struct loop *, rtx, rtx, struct iv_class *, int, basic_block, rtx  )  [static]

static int maybe_eliminate_biv PARAMS ( (const struct loop *, struct iv_class *, int, int, int)   )  [static]

static void combine_givs PARAMS ( (struct loop_regs *, struct iv_class *)   )  [static]

static int cmp_combine_givs_stats PARAMS ( (const PTR, const PTR  )  [static]

static rtx combine_givs_p PARAMS ( (struct induction *, struct induction *)   )  [static]

static rtx express_from_1 PARAMS ( (rtx, rtx, rtx  )  [static]

static int consec_sets_giv PARAMS ( (const struct loop *, int, rtx, rtx, rtx, rtx *, rtx *, rtx *, rtx *)   )  [static]

static int general_induction_var PARAMS ( (const struct loop *loop, rtx, rtx *, rtx *, rtx *, rtx *, int, int *, enum machine_mode  )  [static]

static rtx simplify_giv_expr PARAMS ( (const struct loop *, rtx, rtx *, int *)   )  [static]

static int basic_induction_var PARAMS ( (const struct loop *, rtx, enum machine_mode, rtx, rtx, rtx *, rtx *, rtx **)   )  [static]

static void check_ext_dependent_givs PARAMS ( (struct iv_class *, struct loop_info *)   )  [static]

static void record_giv PARAMS ( (const struct loop *, struct induction *, rtx, rtx, rtx, rtx, rtx, rtx, int, enum g_types, int, int, rtx *)   )  [static]

static void loop_biv_dump PARAMS ( (const struct induction *, FILE *, int)   )  [static]

static void loop_iv_class_dump PARAMS ( (const struct iv_class *, FILE *, int)   )  [static]

static void loop_ivs_dump PARAMS ( (const struct loop *, FILE *, int)   )  [static]

static void check_final_value PARAMS ( (const struct loop *, struct induction *)   )  [static]

static void record_biv PARAMS ( (struct loop *, struct induction *, rtx, rtx, rtx, rtx, rtx *, int, int)   )  [static]

static void find_mem_givs PARAMS ( (const struct loop *, rtx, rtx, int, int)   )  [static]

static int valid_initial_value_p PARAMS ( (rtx, rtx, int, rtx  )  [static]

static void find_single_use_in_loop PARAMS ( (struct loop_regs *, rtx, rtx  )  [static]

static void loop_givs_rescan PARAMS ( (struct loop *, struct iv_class *, rtx *)   )  [static]

static void loop_givs_dead_check PARAMS ( (struct loop *, struct iv_class *)   )  [static]

static int loop_giv_reduce_benefit PARAMS ( (struct loop *, struct iv_class *, struct induction *, rtx  )  [static]

static int loop_biv_eliminable_p PARAMS ( (struct loop *, struct iv_class *, int, int)   )  [static]

static int count_nonfixed_reads PARAMS ( (const struct loop *, rtx  )  [static]

static void loop_movables_add PARAMS ( (struct loop_movables *, struct movable *)   )  [static]

static void move_movables PARAMS ( (struct loop *loop, struct loop_movables *, int, int)   )  [static]

static int rtx_equal_for_loop_p PARAMS ( (rtx, rtx, struct loop_movables *, struct loop_regs *)   )  [static]

static int regs_match_p PARAMS ( (rtx, rtx, struct loop_movables *)   )  [static]

static int num_unmoved_movables PARAMS ( (const struct loop *)   )  [static]

static void combine_movables PARAMS ( (struct loop_movables *, struct loop_regs *)   )  [static]

static void ignore_some_movables PARAMS ( (struct loop_movables *)   )  [static]

static void scan_loop PARAMS ( (struct loop *, int)   )  [static]

static int loop_reg_used_before_p PARAMS ( (const struct loop *, rtx, rtx  )  [static]

static void note_addr_stored PARAMS ( (rtx, rtx, void *)   )  [static]

static void count_one_set PARAMS ( (struct loop_regs *, rtx, rtx, rtx *)   )  [static]

static int labels_in_range_p PARAMS ( (rtx, int)   )  [static]

static int consec_sets_invariant_p PARAMS ( (const struct loop *, rtx, int, rtx  )  [static]

static int reg_in_basic_block_p PARAMS ( (rtx, rtx  )  [static]

static void prescan_loop PARAMS ( (struct loop *)   )  [static]

static void mark_loop_jump PARAMS ( (rtx, struct loop *)   )  [static]

static void find_and_verify_loops PARAMS ( (rtx, struct loops *)   )  [static]

static void invalidate_loops_containing_label PARAMS ( (rtx  )  [static]

static void prescan_loop ( struct loop loop  )  [static]

static int product_cheap_p ( rtx  a,
rtx  b 
) [static]

static void record_biv ( struct loop loop,
struct induction v,
rtx  insn,
rtx  dest_reg,
rtx  inc_val,
rtx  mult_val,
rtx location,
int  not_every_iteration,
int  maybe_multiple 
) [static]

static void record_excess_regs ( rtx  in_this,
rtx  not_in_this,
rtx output 
)

Definition at line 1204 of file loop.c.

Referenced by libcall_other_reg(), and record_excess_regs().

static void record_giv ( struct loop loop,
struct induction v,
rtx  insn,
rtx  src_reg,
rtx  dest_reg,
rtx  mult_val,
rtx  add_val,
rtx  ext_val,
int  benefit,
enum g_types  type,
int  not_every_iteration,
int  maybe_multiple,
rtx location 
) const [static]

static void record_initial ( rtx  dest,
rtx  set,
data   
) [static]

static int reg_in_basic_block_p ( rtx  insn,
rtx  reg 
) [static]

Definition at line 1285 of file loop.c.

References GET_CODE, INSN_UID, NEXT_INSN, p, movable::regno, REGNO, REGNO_FIRST_UID, and REGNO_LAST_UID.

Referenced by scan_loop().

static int regs_match_p ( rtx  x,
rtx  y,
struct loop_movables movables 
) [static]

Definition at line 1606 of file loop.c.

References loop_movables::head, movable::match, movable::next, movable::regno, REGNO, and yn().

Referenced by rtx_equal_for_loop_p().

static HOST_WIDE_INT remove_constant_addition ( rtx x  )  [static]

Definition at line 3728 of file loop.c.

References CONST, const0_rtx, exp, GET_CODE, HOST_WIDE_INT, INTVAL, PLUS, and XEXP.

Referenced by emit_prefetch_instructions(), and remove_constant_addition().

static int replace_label ( rtx x,
void data 
) [static]

static int replace_loop_mem ( rtx mem,
void data 
) [static]

static void replace_loop_mems ( rtx  insn,
rtx  mem,
rtx  reg,
int  written 
) [static]

static int replace_loop_reg ( rtx px,
void data 
) [static]

static void replace_loop_regs ( rtx  insn,
rtx  reg,
rtx  replacement 
) [static]

static int rtx_equal_for_loop_p ( rtx  x,
rtx  y,
struct loop_movables movables,
struct loop_regs regs 
) [static]

static int rtx_equal_for_prefetch_p ( rtx  x,
rtx  y 
) [static]

static void scan_loop ( struct loop loop,
int  flags 
) [static]

Definition at line 606 of file loop.c.

References any_uncondjump_p(), loop_regs::array, combine_movables(), movable::cond, movable::consec, consec_sets_invariant_p(), const0_rtx, CONST_OR_PURE_CALL_P, CONSTANT_P, copy_rtx(), count_insns_in_loop(), delete_insn(), delete_related_insns(), movable::dependencies, dependencies, movable::done, emit_note_after(), find_reg_note(), FIRST_PSEUDO_REGISTER, flag_strength_reduce, movable::force, force_movables(), movable::forces, fprintf(), free(), gen_rtx_EXPR_LIST, GET_CODE, GET_MODE, GET_MODE_CLASS, movable::global, loop_info::has_call, loop_movables::head, i, ignore_some_movables(), movable::insn, INSN_IN_RANGE_P, INSN_P, INSN_UID, movable::is_equiv, JUMP_LABEL, LABEL_NUSES, labels_in_range_p(), loop_movables::last, libcall_benefit(), libcall_other_reg(), movable::lifetime, load_mems(), loop_dump_stream, LOOP_INFO, loop_invariant_p(), loop_max_reg, LOOP_MOVABLES, loop_movables_add(), loop_movables_free(), LOOP_REG_GLOBAL_P, LOOP_REG_LIFETIME, loop_reg_used_before_p(), LOOP_REGNO_NREGS, LOOP_REGS, loop_regs_scan(), movable::match, max_reg_before_loop, max_reg_num(), max_uid_for_loop, may_trap_p(), loop_info::mems_idx, MODE_CC, modified_between_p(), movable::move_insn, movable::move_insn_first, move_movables(), n_non_fixed_regs, loop_reg::n_times_set, movable::next, NEXT_INSN, next_insn_in_loop(), next_label(), next_nonnote_insn(), no_labels_between_p(), NOTE_INSN_DELETED, NOTE_INSN_LOOP_BEG, NOTE_INSN_LOOP_END, NOTE_INSN_LOOP_VTOP, NOTE_LINE_NUMBER, NULL_RTX, loop_regs::num, optimize_size, p, movable::partial, PATTERN, PIC_OFFSET_TABLE_REG_CALL_CLOBBERED, pic_offset_table_rtx, prescan_loop(), PREV_INSN, prev_nonnote_insn(), REG, REG_EQUAL, REG_EQUIV, reg_in_basic_block_p(), REG_LIBCALL, reg_mentioned_p(), REG_NOTES, REG_RETVAL, reg_scan_update(), movable::regno, REGNO, REGNO_FIRST_LUID, REGNO_FIRST_UID, REGNO_LAST_UID, regs, replace_rtx(), movable::savemode, movable::savings, SET, SET_DEST, movable::set_dest, loop_reg::set_in_loop, movable::set_src, SET_SRC, side_effects_p(), single_set, loop_reg::single_usage, skip_consec_insns(), SMALL_REGISTER_CLASSES, src, strength_reduce(), SUBREG_REG, USE, validate_replace_rtx(), x, XEXP, xmalloc(), XVECEXP, and XVECLEN.

Referenced by loop_optimize().

static rtx sge_plus ( enum machine_mode  mode,
rtx  x,
rtx  y 
) [static]

Definition at line 7036 of file loop.c.

References a, gen_rtx_PLUS, GET_CODE, PLUS, sge_plus_constant(), and XEXP.

Referenced by simplify_giv_expr().

static rtx sge_plus_constant ( rtx  x,
rtx  c 
) [static]

Definition at line 7010 of file loop.c.

References GEN_INT, gen_rtx_PLUS, GET_CODE, GET_MODE, INTVAL, PLUS, and XEXP.

Referenced by sge_plus(), sge_plus_constant(), and simplify_giv_expr().

static rtx simplify_giv_expr ( struct loop loop,
rtx  x,
rtx ext_val,
int *  benefit 
) const [static]

static rtx skip_consec_insns ( rtx  insn,
int  count 
) [static]

Definition at line 1363 of file loop.c.

References find_reg_note(), GET_CODE, NEXT_INSN, NULL_RTX, REG_LIBCALL, and XEXP.

Referenced by scan_loop().

static void strength_reduce ( struct loop loop,
int  flags 
) [static]

Definition at line 5076 of file loop.c.

References induction::add_val, iv_class::all_reduced, induction::benefit, iv_class::biv, bl, check_dbra_loop(), check_ext_dependent_givs(), combine_givs(), const1_rtx, count_insns_in_loop(), induction::dest_reg, iv_class::eliminable, emit_prefetch_instructions(), iv_class::final_value, flag_branch_on_count_reg, flag_reduce_all_givs, fprintf(), free(), gen_load_of_final_value(), gen_reg_rtx(), gen_rtx_REG(), GET_CODE, iv_class::giv, loop_info::has_call, HAVE_doloop_end, HOST_WIDE_INT, induction::ignore, induction::insn, INSN_CODE, INSN_UID, LAST_VIRTUAL_REGISTER, induction::lifetime, loop_ivs::list, LOOP_AUTO_UNROLL, LOOP_BCT, loop_biv_eliminable_p(), loop_bivs_check(), loop_bivs_find(), loop_bivs_init_find(), loop_dump_stream, loop_giv_reduce_benefit(), loop_givs_check(), loop_givs_dead_check(), loop_givs_find(), loop_givs_reduce(), loop_givs_rescan(), LOOP_INFO, loop_insn_sink(), loop_insn_sink_or_swim(), loop_iterations(), LOOP_IVS, loop_ivs_free(), LOOP_PREFETCH, LOOP_REGS, LOOP_UNROLL, max_reg_before_loop, induction::maybe_dead, maybe_eliminate_biv(), induction::mult_val, n, loop_info::n_iterations, n_non_fixed_regs, loop_ivs::n_regs, iv_class::next, NEXT_INSN, induction::next_iv, NULL, PATTERN, Pmode, predict_insn(), prev_nonnote_insn(), product_cheap_p(), REG_BR_PROB_BASE, REG_NOTES, iv_class::regno, regs, loop_ivs::regs, replace_regs(), iv_class::reversed, induction::same, unroll_loop(), loop_info::unroll_number, word_mode, and xcalloc().

Referenced by scan_loop().

static void try_copy_prop ( struct loop loop,
rtx  replacement,
unsigned int  regno 
) const [static]

static void try_swap_copy_prop ( struct loop loop,
rtx  replacement,
unsigned int  regno 
) const [static]

static void update_giv_derive ( struct loop loop,
rtx  p 
) const [static]

static void update_reg_last_use ( rtx  x,
rtx  insn 
) [static]

static int valid_initial_value_p ( rtx  x,
rtx  insn,
int  call_seen,
rtx  loop_start 
) [static]


Variable Documentation

Definition at line 4251 of file loop.c.

int copy_cost [static]

Definition at line 386 of file loop.c.

Referenced by loop_optimize(), and prescan_loop().

int loop_max_reg [static]

Definition at line 186 of file loop.c.

Referenced by loop_optimize(), and scan_loop().

int max_loop_num [static]

Definition at line 179 of file loop.c.

Referenced by loop_optimize().

int max_luid [static]

Definition at line 174 of file loop.c.

Referenced by loop_optimize().

unsigned int max_reg_before_loop

rtx note_insn [static]

Definition at line 4247 of file loop.c.

int reg_address_cost [static]

Definition at line 400 of file loop.c.

Referenced by combine_givs(), general_induction_var(), and init_loop().

Definition at line 166 of file loop.c.

int* uid_luid

Definition at line 161 of file loop.c.

Referenced by compute_luids(), and loop_optimize().


Generated on Wed Apr 8 15:39:43 2009 for Open64 by  doxygen 1.5.6