#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"

Go to the source code of this file.
| #define CODE_FOR_prefetch 0 |
Definition at line 67 of file loop.c.
Referenced by emit_prefetch_instructions(), and expand_builtin_prefetch().
Definition at line 68 of file loop.c.
Referenced by emit_prefetch_instructions(), and expand_builtin_prefetch().
| #define INSN_IN_RANGE_P | ( | INSN, | |||
| START, | |||||
| END | ) |
| #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) |
| #define LOOP_INSN_UID | ( | INSN | ) | ((INSN) ? INSN_UID (INSN) : -1) |
| #define LOOP_REG_GLOBAL_P | ( | LOOP, | |||
| REGNO | ) |
Value:
((REGNO_LAST_LUID (REGNO) > INSN_LUID ((LOOP)->end) \ || REGNO_FIRST_LUID (REGNO) < INSN_LUID ((LOOP)->start)))
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))) |
| #define LOOP_REGNO_NREGS | ( | REGNO, | |||
| SET_DEST | ) |
Value:
((REGNO) < FIRST_PSEUDO_REGISTER \ ? (int) HARD_REGNO_NREGS ((REGNO), GET_MODE (SET_DEST)) : 1)
Definition at line 152 of file loop.c.
Referenced by count_one_set(), move_movables(), and scan_loop().
| #define PREFETCH_BEFORE_LOOP 1 |
| #define PREFETCH_BLOCKS_BEFORE_LOOP_MAX 6 |
| #define PREFETCH_BLOCKS_BEFORE_LOOP_MIN 2 |
| #define PREFETCH_CONDITIONAL 1 |
| #define PREFETCH_DENSE_MEM 220 |
| #define PREFETCH_EXTREME_DIFFERENCE 4096 |
| #define PREFETCH_EXTREME_STRIDE 4096 |
| #define PREFETCH_LOW_LOOPCNT 32 |
| #define PREFETCH_NO_CALL 1 |
| #define PREFETCH_NO_EXTREME_STRIDE 1 |
| #define PREFETCH_NO_LOW_LOOPCNT 1 |
| #define PREFETCH_NO_REVERSE_ORDER 1 |
| #define PREFETCH_ONLY_DENSE_MEM 1 |
Definition at line 1754 of file loop.c.
References add_label_notes(), gen_rtx_INSN_LIST, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, i, movable::insn, LABEL_NUSES, LABEL_P, LABEL_REF_NONLOCAL_P, NEXT_INSN, REG_LABEL, reg_mentioned_p(), REG_NOTES, XEXP, XVECEXP, and XVECLEN.
| 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] |
Definition at line 6266 of file loop.c.
References CONST, const0_rtx, const1_rtx, convert_modes(), delete_insns_since(), dest, GET_CODE, get_last_insn(), GET_MODE, GET_MODE_CLASS, GET_MODE_SIZE, INTVAL, last, loop_invariant_p(), MEM, MODE_CC, MODE_INT, NOTE_INSN_LOOP_BEG, NOTE_LINE_NUMBER, NULL, PLUS, PREV_INSN, REG, rtx_equal_p(), SET_DEST, SET_SRC, SIGN_EXTEND, single_set, SUBREG_PROMOTED_VAR_P, SUBREG_REG, UNITS_PER_WORD, and XEXP.
Referenced by basic_induction_var(), and check_insn_for_bivs().
| 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().
Definition at line 9289 of file loop.c.
References cc0_rtx, COMPARE, CONST0_RTX, const_val, CONSTANT_P, EQ, FIND_REG_INC_NOTE, FLOAT_STORE_FLAG_VALUE, GE, gen_int_mode(), gen_rtx_fmt_ee(), GET_CODE, GET_MODE, GET_MODE_BITSIZE, GET_MODE_CLASS, GET_MODE_MASK, GET_RTX_CLASS, GT, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, INTVAL, LE, LT, mode, MODE_CC, MODE_FLOAT, MODE_INT, NE, NULL_RTX, prev, prev_nonnote_insn(), REAL_VALUE_NEGATIVE, REAL_VALUE_TYPE, REG, reg_set_p(), reversed_comparison_code(), rtx_equal_p(), SET, SET_DEST, set_of(), SET_SRC, single_set, STORE_FLAG_VALUE, swap_condition(), UNKNOWN, and XEXP.
Referenced by expected_value_to_br_prob(), get_condition(), noce_get_alt_condition(), and noce_get_condition().
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] |
Definition at line 7429 of file loop.c.
References abort, biv_total_increment(), const1_rtx, induction::ext_dependent, fprintf(), GET_CODE, GET_MODE, GET_MODE_BITSIZE, GET_MODE_MASK, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, induction::ignore, induction::insn, INSN_UID, INTVAL, loop_dump_stream, max, loop_info::n_iterations, induction::next_iv, ok(), pc_rtx, SIGN_EXTEND, and TRUNCATE.
Referenced by strength_reduce().
Definition at line 5979 of file loop.c.
References induction::always_executed, bl, induction::dest_reg, final_giv_value(), induction::final_value, iv_class::final_value, fprintf(), GET_CODE, induction::insn, INSN_UID, JUMP_LABEL, LABEL_NAME, last_use_this_basic_block(), loop_dump_stream, loop_insn_first_p(), LOOP_IVS, NEXT_INSN, induction::not_replaceable, PATTERN, REG_IV_CLASS, reg_mentioned_p(), reg_set_p(), REGNO, induction::replaceable, and induction::src_reg.
Referenced by loop_givs_check().
| static rtx check_insn_for_bivs | ( | struct loop * | loop, | |
| rtx | p, | |||
| int | not_every_iteration, | |||
| int | maybe_multiple | |||
| ) | [static] |
Definition at line 5392 of file loop.c.
References BASIC_INDUCT, basic_induction_var(), FIRST_PSEUDO_REGISTER, GET_CODE, GET_MODE, location, LOOP_IVS, max_reg_before_loop, loop_ivs::n_regs, NOT_BASIC_INDUCT, record_biv(), REG, REG_IV_TYPE, REGNO, SET_DEST, SET_SRC, single_set, and xmalloc().
Referenced by loop_bivs_find().
| static rtx check_insn_for_givs | ( | struct loop * | loop, | |
| rtx | p, | |||
| int | not_every_iteration, | |||
| int | maybe_multiple | |||
| ) | [static] |
Definition at line 5440 of file loop.c.
References loop_regs::array, consec_sets_giv(), DEST_REG, find_mem_givs(), find_reg_note(), FIRST_PSEUDO_REGISTER, general_induction_var(), GET_CODE, libcall_benefit(), LOOP_REGS, max_reg_before_loop, loop_reg::n_times_set, NULL_RTX, PATTERN, record_giv(), REG, REG_EQUAL, REG_RETVAL, REGNO, regs, SET_DEST, SET_SRC, single_set, update_giv_derive(), XEXP, and xmalloc().
Referenced by emit_prefetch_instructions(), and loop_givs_find().
Definition at line 3627 of file loop.c.
References d, GET_CODE, MEM, check_store_data::mem_address, check_store_data::mem_write, rtx_equal_p(), and XEXP.
Referenced by emit_prefetch_instructions().
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().
Definition at line 7640 of file loop.c.
References address_cost(), alloca, induction::benefit, cmp_combine_givs_stats(), combine_givs_p(), induction::combined_with, const0_rtx, DEST_ADDR, DEST_REG, induction::dest_reg, fprintf(), free(), GET_MODE, iv_class::giv, combine_givs_stats::giv_number, induction::giv_type, induction::ignore, induction::insn, INSN_UID, induction::lifetime, loop_dump_stream, induction::mem, induction::new_reg, induction::next_iv, induction::no_const_addval, NULL_RTX, putc(), qsort(), REG_USERVAR_P, REGNO, induction::replaceable, induction::same, stats, combine_givs_stats::total_benefit, and xcalloc().
Referenced by strength_reduce().
Definition at line 7373 of file loop.c.
References ADDRESS_COST, DEST_ADDR, DEST_REG, express_from(), gen_lowpart, GET_MODE, GET_MODE_SIZE, MEM, memory_address_p(), NULL_RTX, ret, and rtx_cost().
Referenced by combine_givs().
| static void combine_movables | ( | struct loop_movables * | movables, | |
| struct loop_regs * | regs | |||
| ) | [static] |
Definition at line 1464 of file loop.c.
References loop_regs::array, movable::dependencies, movable::done, first, FIRST_PSEUDO_REGISTER, free(), GET_CLASS_NARROWEST_MODE, GET_CODE, GET_MODE, GET_MODE_BITSIZE, GET_MODE_CLASS, GET_MODE_WIDER_MODE, movable::global, movable::insn, last, movable::lifetime, movable::match, memset, mode, MODE_INT, loop_reg::n_times_set, movable::next, NEXT_INSN, loop_regs::num, movable::partial, PATTERN, REG, movable::regno, REGNO, REGNO_FIRST_LUID, REGNO_LAST_LUID, rtx_equal_for_loop_p(), rtx_equal_p(), movable::savings, movable::set_dest, movable::set_src, SET_SRC, and xmalloc().
Referenced by scan_loop().
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] |
Definition at line 7076 of file loop.c.
References induction::add_val, alloca, loop_regs::array, induction::benefit, induction::cant_derive, CONSTANT_P, count, induction::derive_adjustment, induction::ext_dependent, find_reg_note(), GENERAL_INDUCT, general_induction_var(), GET_CODE, libcall_benefit(), LOOP_IVS, LOOP_REGS, induction::mult_val, loop_reg::n_times_set, NEXT_INSN, NULL_RTX, REG, REG_EQUAL, REG_IV_INFO, REG_IV_TYPE, REG_LIBCALL, REG_RETVAL, REGNO, regs, SET_DEST, SET_SRC, single_set, induction::src_reg, UNKNOWN_INDUCT, and XEXP.
Referenced by check_insn_for_givs().
| static int consec_sets_invariant_p | ( | struct loop * | loop, | |
| rtx | reg, | |||
| int | n_sets, | |||
| rtx | insn | |||
| ) | const [static] |
Definition at line 3368 of file loop.c.
References loop_regs::array, CONSTANT_P, count, find_reg_note(), GET_CODE, loop_invariant_p(), LOOP_REGS, NEXT_INSN, NULL_RTX, p, REG, REG_EQUAL, REG_LIBCALL, REG_RETVAL, REGNO, regs, SET_DEST, loop_reg::set_in_loop, SET_SRC, single_set, and XEXP.
Referenced by move_movables(), and scan_loop().
Definition at line 9813 of file loop.c.
References count, INSN_P, and NEXT_INSN.
Referenced by scan_loop(), and strength_reduce().
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().
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().
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().
Definition at line 7291 of file loop.c.
References const0_rtx, const1_rtx, CONSTANT_P, express_from_1(), GEN_INT, gen_rtx_MULT, gen_rtx_PLUS, GET_CODE, GET_MODE, HOST_WIDE_INT, INTVAL, mult, NULL_RTX, PLUS, rtx_equal_p(), and XEXP.
Referenced by combine_givs_p().
Definition at line 7192 of file loop.c.
References const0_rtx, const1_rtx, CONSTANT_P, GEN_INT, gen_rtx_PLUS, GET_CODE, GET_MODE, INTVAL, MINUS, mode, NULL_RTX, PLUS, plus_constant, rtx_equal_p(), simplify_gen_binary(), tmp, and XEXP.
Referenced by express_from(), and express_from_1().
Definition at line 7591 of file loop.c.
Referenced by final_giv_value(), find_splittable_givs(), loop_givs_reduce(), loop_givs_rescan(), and loop_iterations().
Definition at line 2655 of file loop.c.
References abort, any_condjump_p(), any_uncondjump_p(), loops::array, compute_luids(), loop::cont, current_loop, delete_related_insns(), emit_barrier_before(), emit_jump_insn_before(), loop::end, loop::exit_count, loop::exit_labels, find_reg_note(), for_each_eh_label(), forced_labels, fprintf(), gen_jump(), GET_CODE, get_label_after(), get_last_insn(), get_max_uid(), if(), insn, INSN_P, INSN_UID, insns_safe_to_move_p(), loop::invalid, invalidate_loops_containing_label(), invert_jump(), JUMP_LABEL, LABEL_NEXTREF, LABEL_NUSES, LABEL_OUTSIDE_LOOP_P, loop_dump_stream, mark_loop_jump(), max_uid_for_loop, new_label, NEXT_INSN, next_nonnote_insn(), next_real_insn(), NOTE_INSN_LOOP_BEG, NOTE_INSN_LOOP_CONT, NOTE_INSN_LOOP_END, NOTE_INSN_LOOP_VTOP, NOTE_LINE_NUMBER, NULL, NULL_RTX, loop::num, loops::num, onlyjump_p(), loop::outer, loop::outer_loop, p, PATTERN, PREV_INSN, q, r, REG_LABEL, REG_SETJMP, reorder_insns(), RETURN, squeeze_notes(), loop::start, target, tmp, loop::vtop, and XEXP.
Referenced by loop_optimize().
| static void find_mem_givs | ( | struct loop * | loop, | |
| rtx | x, | |||
| rtx | insn, | |||
| int | not_every_iteration, | |||
| int | maybe_multiple | |||
| ) | const [static] |
Definition at line 5570 of file loop.c.
References induction::add_val, induction::benefit, CONST, DEST_ADDR, general_induction_var(), GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, induction::mem, MEM, induction::mult_val, PC, record_giv(), REG, induction::src_reg, USE, XEXP, xmalloc(), XVECEXP, and XVECLEN.
Referenced by check_insn_for_givs(), and find_mem_givs().
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().
Definition at line 3474 of file loop.c.
References const0_rtx, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, REG, REGNO, SET, SET_DEST, SET_SRC, XEXP, XVECEXP, and XVECLEN.
Referenced by find_single_use_in_loop(), and loop_regs_scan().
| void for_each_insn_in_loop | ( | struct loop * | loop, | |
| loop_insn_callback | fncall | |||
| ) |
Definition at line 4291 of file loop.c.
References any_condjump_p(), any_uncondjump_p(), back_branch_in_range_p(), GET_CODE, JUMP_LABEL, LABEL_NEXTREF, loop_insn_first_p(), NEXT_INSN, next_insn_in_loop(), no_labels_between_p(), NOTE_INSN_LOOP_BEG, NOTE_INSN_LOOP_CONT, NOTE_INSN_LOOP_END, NOTE_INSN_LOOP_VTOP, NOTE_LINE_NUMBER, NULL_RTX, PATTERN, prev_nonnote_insn(), RETURN, and XEXP.
Referenced by loop_bivs_find(), and loop_givs_find().
| static void force_movables | ( | struct loop_movables * | movables | ) | [static] |
Definition at line 1424 of file loop.c.
References movable::consec, movable::done, movable::forces, movable::insn, INSN_UID, movable::lifetime, movable::next, movable::partial, movable::regno, REGNO_LAST_UID, movable::savings, movable::set_dest, and movable::set_src.
Referenced by scan_loop().
Definition at line 7813 of file loop.c.
References emit_move_insn(), end_sequence(), expand_mult_add(), get_insns(), GET_MODE, result, and start_sequence().
Referenced by loop_iv_add_mult_emit_before(), loop_iv_add_mult_hoist(), and loop_iv_add_mult_sink().
Definition at line 10667 of file loop.c.
References emit_move_insn(), end_sequence(), force_operand(), get_insns(), and start_sequence().
Referenced by check_dbra_loop(), loop_givs_rescan(), and strength_reduce().
| 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] |
Definition at line 6468 of file loop.c.
References abort, address_cost(), iv_class::biv, const0_rtx, const1_rtx, induction::dest_reg, GET_CODE, loop_ivs::list, loop_invariant_p(), LOOP_IVS, NULL_RTX, PLUS, REG, rtx_cost(), SET, simplify_giv_expr(), USE, and XEXP.
Referenced by check_insn_for_givs(), consec_sets_giv(), and find_mem_givs().
Definition at line 9540 of file loop.c.
References any_condjump_p(), canonicalize_condition(), cond, GET_CODE, JUMP_LABEL, NULL_RTX, pc_set(), SET_SRC, and XEXP.
Referenced by add_dependence(), bb_estimate_probability_locally(), check_dbra_loop(), check_simple_exit(), delete_null_pointer_checks(), delete_null_pointer_checks_1(), estimate_probability(), fis_get_condition(), get_condition_for_loop(), may_unswitch_on(), and simplify_using_initial_values().
Definition at line 9569 of file loop.c.
References gen_rtx_fmt_ee(), GET_CODE, get_condition(), loop_invariant_p(), swap_condition(), and XEXP.
Referenced by check_dbra_loop(), loop_bivs_init_find(), and loop_iterations().
| 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().
Definition at line 403 of file loop.c.
Referenced by backend_init(), Create_Initialize_Loop(), and Parallelize_Doacross_Loop().
Definition at line 9606 of file loop.c.
References GET_CODE, GET_MODE, loop_mem_info::mem, MEM, loop_info::mems, loop_info::mems_allocated, loop_info::mems_idx, NULL_RTX, loop_mem_info::optimize, loop_mem_info::reg, rtx_equal_p(), and xrealloc().
Referenced by prescan_loop().
Definition at line 2642 of file loop.c.
References INSN_UID, loop::invalid, and loop::outer.
Referenced by find_and_verify_loops().
Definition at line 7963 of file loop.c.
References emit_move_insn(), end_sequence(), expand_mult_add(), get_last_insn(), GET_MODE, last, PREV_INSN, result, rtx_cost(), SET, SET_SRC, single_set, and start_sequence().
Referenced by loop_giv_reduce_benefit().
| static int labels_in_range_p | ( | rtx | insn, | |
| int | end | |||
| ) | [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] |
Definition at line 1339 of file loop.c.
References find_reg_note(), GET_CODE, movable::insn, NEXT_INSN, NULL_RTX, PATTERN, REG_RETVAL, USE, and XEXP.
Referenced by check_insn_for_givs(), consec_sets_giv(), and scan_loop().
Definition at line 9830 of file loop.c.
References any_condjump_p(), any_uncondjump_p(), apply_change_group(), loop_regs::array, CALL_INSN_FUNCTION_USAGE, cancel_changes(), CLEAR_REG_SET, CONSTANT_P, copy_rtx(), cselib_finish(), cselib_init(), cselib_lookup(), cselib_process_insn(), cselib_val, emit_label_after(), EXECUTE_IF_SET_IN_REG_SET, FIRST_PSEUDO_REGISTER, flag_float_store, for_each_rtx(), fprintf(), fputc(), gen_label_rtx(), gen_move_insn(), gen_reg_rtx(), GET_CODE, GET_MODE, GET_MODE_CLASS, INIT_REG_SET, INSN_LUID, INSN_P, INSN_UID, JUMP_LABEL, loop_dump_stream, LOOP_INFO, loop_insn_emit_after(), loop_insn_hoist(), loop_invariant_p(), LOOP_REGS, max_reg_num(), max_uid_for_loop, may_trap_p(), loop_mem_info::mem, mem, MEM_VOLATILE_P, loop_info::mems, loop_info::mems_idx, MODE_FLOAT, NEXT_INSN, next_insn_in_loop(), next_nonnote_insn(), NULL_RTX, loop_mem_info::optimize, PREV_INSN, print_rtl(), rtx_pair::r1, rtx_pair::r2, REG, loop_mem_info::reg, REG_EQUAL, reg_mentioned_p(), REG_P, REG_USERVAR_P, REGNO, REGNO_LAST_UID, regs, replace_label(), replace_loop_mems(), rr, rtx_cost(), rtx_equal_p(), rtx_varies_p(), SET, SET_DEST, SET_REGNO_REG_SET, SET_SRC, set_unique_reg_note(), single_set, loop_info::store_mems, true_dependence(), try_copy_prop(), try_swap_copy_prop(), while(), and XEXP.
Referenced by scan_loop().
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] |
Definition at line 4627 of file loop.c.
References iv_class::biv, induction::dest_reg, final_biv_value(), iv_class::final_value, fprintf(), iv_class::init_insn, iv_class::init_set, INSN_LUID, INSN_UID, loop_dump_stream, max_uid_for_loop, maybe_eliminate_biv(), iv_class::nonneg, reg_mentioned_p(), iv_class::regno, REGNO_FIRST_LUID, REGNO_FIRST_UID, REGNO_LAST_LUID, REGNO_LAST_UID, and SET_SRC.
Referenced by strength_reduce().
Definition at line 4536 of file loop.c.
References bl, CONSTANT_P, find_reg_note(), fprintf(), fputc(), GET_MODE, iv_class::init_insn, iv_class::init_set, iv_class::initial_value, INSN_UID, loop_ivs::list, loop_dump_stream, LOOP_IVS, iv_class::next, NULL, print_simple_rtl(), REG_EQUAL, REG_EQUIV, iv_class::regno, regno_reg_rtx, SET_SRC, src, valid_initial_value_p(), and XEXP.
Referenced by strength_reduce().
Definition at line 4431 of file loop.c.
References loop_regs::array, BASIC_INDUCT, iv_class::biv_count, bl, check_insn_for_bivs(), for_each_insn_in_loop(), fprintf(), iv_class::incremented, loop_ivs::list, loop_dump_stream, LOOP_IVS, LOOP_REGS, loop_reg::n_times_set, iv_class::next, NOT_BASIC_INDUCT, REG_IV_TYPE, iv_class::regno, and regs.
Referenced by strength_reduce().
Definition at line 4480 of file loop.c.
References bl, gen_rtx_SET, GET_CODE, get_condition_for_loop(), iv_class::init_insn, iv_class::init_set, iv_class::initial_test, INSN_P, JUMP_LABEL, LOOP_IVS, max_reg_before_loop, NE, next_real_insn(), note_stores(), PATTERN, PREV_INSN, record_initial(), REG, REG_IV_CLASS, REGNO, valid_initial_value_p(), and XEXP.
Referenced by strength_reduce().
| 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().
Definition at line 10646 of file loop.c.
References loop_call_insn_emit_before().
Referenced by move_movables().
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().
Definition at line 10921 of file loop.c.
References fprintf(), fputs(), GET_CODE, INSN_UID, LABEL_NEXTREF, LOOP_BLOCK_NUM, LOOP_INSN_UID, NEXT_INSN, NOTE_INSN_LOOP_BEG, NOTE_INSN_LOOP_END, NOTE_LINE_NUMBER, PREV_INSN, and XEXP.
Referenced by debug_loop(), debug_loops(), flow_loop_dump(), and flow_loops_dump().
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] |
Definition at line 4958 of file loop.c.
References add_cost, induction::add_val, induction::benefit, iv_class::biv, iv_class::biv_count, DEST_ADDR, induction::dest_reg, iv_class::eliminable, GET_CODE, GET_MODE, GET_MODE_SIZE, induction::giv_type, HAVE_POST_DECREMENT, HAVE_POST_INCREMENT, HAVE_PRE_DECREMENT, HAVE_PRE_INCREMENT, INTVAL, iv_add_mult_cost(), induction::mem, induction::mode, induction::mult_val, PUT_MODE, REG_USERVAR_P, induction::replaceable, and size.
Referenced by strength_reduce().
Definition at line 4604 of file loop.c.
References bl, check_final_value(), iv_class::giv, loop_ivs::list, LOOP_IVS, iv_class::next, induction::next_iv, induction::not_replaceable, and induction::replaceable.
Referenced by strength_reduce().
Definition at line 4818 of file loop.c.
References DEST_REG, induction::dest_reg, iv_class::giv, induction::giv_type, induction::ignore, induction::insn, INSN_UID, induction::maybe_dead, induction::next_iv, REGNO, REGNO_FIRST_UID, REGNO_LAST_UID, and induction::same.
Referenced by strength_reduce().
Definition at line 4592 of file loop.c.
References check_insn_for_givs(), and for_each_insn_in_loop().
Referenced by strength_reduce().
Definition at line 4679 of file loop.c.
References induction::add_val, induction::always_executed, induction::auto_inc_opt, iv_class::biv, iv_class::biv_count, induction::combined_with, const1_rtx, DEST_ADDR, induction::dest_reg, extend_value_for_giv(), gen_reg_rtx(), iv_class::giv, induction::giv_type, induction::ignore, iv_class::initial_value, induction::insn, INSN_LUID, INSN_P, INSN_UID, loop_iv_add_mult_emit_before(), loop_iv_add_mult_hoist(), max_reg_before_loop, max_uid_for_loop, induction::maybe_multiple, induction::mode, induction::mult_val, induction::new_reg, NEXT_INSN, induction::next_iv, PATTERN, prev, prev_nonnote_insn(), REGNO, REGNO_LAST_UID, iv_class::reversed, induction::same, and sets_cc0_p().
Referenced by strength_reduce().
Definition at line 4844 of file loop.c.
References induction::add_val, align, BITS_PER_UNIT, DEST_ADDR, DEST_REG, induction::dest_reg, extend_value_for_giv(), induction::final_value, find_reg_note(), fprintf(), gen_load_of_final_value(), gen_move_insn(), GET_CODE, iv_class::giv, induction::giv_type, induction::ignore, iv_class::initial_value, induction::insn, INSN_UID, INTVAL, induction::location, loop_dump_stream, loop_insn_emit_after(), loop_insn_sink_or_swim(), loop_iv_add_mult_sink(), mark_reg_pointer(), induction::mult_val, induction::new_reg, induction::next_iv, NULL_RTX, print_simple_rtl(), REG, REG_EQUAL, REG_POINTER, REGNO, REGNO_POINTER_ALIGN, remove_note(), replace_rtx(), induction::replaceable, iv_class::reversed, induction::same, induction::src_reg, and validate_change().
Referenced by strength_reduce().
Definition at line 10591 of file loop.c.
References emit_insn_after().
Referenced by load_mems(), loop_givs_rescan(), and move_movables().
Definition at line 10606 of file loop.c.
References emit_insn_before(), and loop_insn_hoist().
Referenced by check_dbra_loop(), copy_loop_body(), emit_prefetch_instructions(), loop_insn_hoist(), loop_insn_sink(), loop_iv_add_mult_emit_before(), and maybe_eliminate_biv_1().
Definition at line 8747 of file loop.c.
Referenced by biv_elimination_giv_has_0_offset(), check_dbra_loop(), check_final_value(), for_each_insn_in_loop(), and loop_iterations().
Definition at line 10635 of file loop.c.
References loop_insn_emit_before().
Referenced by check_dbra_loop(), find_splittable_givs(), find_splittable_regs(), load_mems(), loop_insn_emit_before(), loop_insn_sink_or_swim(), loop_iv_add_mult_hoist(), move_movables(), and unroll_loop().
Definition at line 10657 of file loop.c.
References loop_insn_emit_before().
Referenced by check_dbra_loop(), final_giv_value(), find_splittable_regs(), loop_insn_sink_or_swim(), loop_iv_add_mult_sink(), and strength_reduce().
Definition at line 10686 of file loop.c.
References loop_insn_hoist(), and loop_insn_sink().
Referenced by loop_givs_rescan(), and strength_reduce().
Definition at line 3228 of file loop.c.
References arg_pointer_rtx, loop_regs::array, call_used_regs, CONST, current_function_has_nonlocal_goto, FIRST_PSEUDO_REGISTER, flag_unroll_loops, frame_pointer_rtx, GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, hard_frame_pointer_rtx, LOOP_INFO, LOOP_REGS, MEM, MEM_VOLATILE_P, loop_regs::num, PC, pic_offset_table_rtx, REG, REGNO, regs, rtx_varies_p(), loop_reg::set_in_loop, loop_info::store_mems, true_dependence(), XEXP, XVECEXP, and XVECLEN.
Referenced by basic_induction_var(), biv_fits_mode_p(), check_dbra_loop(), consec_sets_invariant_p(), copy_loop_body(), count_nonfixed_reads(), emit_prefetch_instructions(), final_biv_value(), final_giv_value(), find_splittable_regs(), general_induction_var(), get_condition_for_loop(), load_mems(), loop_invariant_p(), loop_iterations(), maybe_eliminate_biv_1(), move_movables(), precondition_loop_p(), scan_loop(), and simplify_giv_expr().
| 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 |
Definition at line 7870 of file loop.c.
References copy_rtx(), gen_add_mult(), loop_insn_emit_before(), loop_iv_add_mult_hoist(), loop_regs_update(), and update_reg_last_use().
Referenced by emit_prefetch_instructions(), loop_givs_reduce(), and maybe_eliminate_biv_1().
Definition at line 7937 of file loop.c.
References copy_rtx(), gen_add_mult(), loop_insn_hoist(), and loop_regs_update().
Referenced by find_splittable_givs(), loop_givs_reduce(), and loop_iv_add_mult_emit_before().
Definition at line 7907 of file loop.c.
References copy_rtx(), gen_add_mult(), loop_insn_sink(), loop_regs_update(), and update_reg_last_use().
Referenced by final_biv_value(), final_giv_value(), and loop_givs_rescan().
Definition at line 10722 of file loop.c.
References induction::add_val, induction::benefit, biv_total_increment(), DEST_ADDR, fprintf(), fputc(), induction::giv_type, induction::insn, INSN_UID, induction::mem, induction::next_iv, print_simple_rtl(), and single_set.
Referenced by debug_iv_class(), and loop_ivs_dump().
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().
Definition at line 5035 of file loop.c.
References iv_class::biv, free(), iv_class::giv, loop_ivs::list, LOOP_IVS, iv_class::next, next, induction::next_iv, and loop_ivs::regs.
Referenced by strength_reduce().
| static void loop_movables_add | ( | struct loop_movables * | movables, | |
| struct movable * | m | |||
| ) | [static] |
| 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().
Definition at line 447 of file loop.c.
Referenced by rest_of_compilation(), and rest_of_handle_loop_optimize().
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().
Definition at line 9696 of file loop.c.
References loop_regs::array, CALL_INSN_FUNCTION_USAGE, count_one_set(), find_single_use_in_loop(), FIRST_PSEUDO_REGISTER, for(), free(), GET_CODE, GET_MODE, GET_MODE_CLASS, INSN_P, LOOP_REGS, max_reg_num(), loop_reg::may_not_optimize, memset, MODE_CC, loop_reg::n_times_set, NEXT_INSN, NULL_RTX, loop_regs::num, PATTERN, REG, REG_NOTES, REGNO, regno_reg_rtx, regs, regs_invalidated_by_call, rtx_varies_p(), SET, loop_reg::set_in_loop, loop_reg::single_usage, loop_regs::size, TEST_HARD_REG_BIT, USE, xcalloc(), XEXP, xrealloc(), XVECEXP, and XVECLEN.
Referenced by scan_loop().
Definition at line 7837 of file loop.c.
References GET_CODE, INSN_P, NEXT_INSN, NULL_RTX, record_base_value(), REG, REGNO, SET, SET_DEST, SET_SRC, and single_set.
Referenced by loop_iv_add_mult_emit_before(), loop_iv_add_mult_hoist(), and loop_iv_add_mult_sink().
Definition at line 2993 of file loop.c.
References CONST, loop::exit_count, loop::exit_labels, fprintf(), GET_CODE, INSN_UID, loop::invalid, LABEL_NEXTREF, LABEL_OUTSIDE_LOOP_P, loop_dump_stream, MEM, MINUS, NULL, loop::outer, loop::outer_loop, PC, pc_rtx, PLUS, REG, RETURN, SET, SET_DEST, SET_SRC, SIGN_EXTEND, loop::start, USE, XEXP, XVECEXP, and XVECLEN.
Referenced by find_and_verify_loops(), and mark_loop_jump().
| static int maybe_eliminate_biv | ( | struct loop * | loop, | |
| struct iv_class * | bl, | |||
| int | eliminate_p, | |||
| int | threshold, | |||
| int | insn_count | |||
| ) | const [static] |
Definition at line 8670 of file loop.c.
References iv_class::biv, induction::dest_reg, find_reg_note(), fprintf(), GENERAL_INDUCT, GET_CODE, GET_RTX_CLASS, INSN_UID, last, loop_dump_stream, LOOP_IVS, maybe_eliminate_biv_1(), loop_ivs::n_regs, NEXT_INSN, NULL_RTX, PATTERN, REG, REG_EQUAL, REG_IV_INFO, REG_IV_TYPE, REG_LIBCALL, reg_mentioned_p(), iv_class::regno, REGNO, remove_note(), SET_DEST, single_set, induction::src_reg, and XEXP.
Referenced by loop_biv_eliminable_p(), and strength_reduce().
| 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] |
Definition at line 8811 of file loop.c.
References induction::add_val, induction::always_computable, apply_change_group(), BASIC_INDUCT, iv_class::biv, biv_elimination_giv_has_0_offset(), cc0_rtx, COMPARE, CONST, const0_rtx, const_mult_add_overflow_p(), CONSTANT_P, copy_rtx(), DEST_ADDR, DEST_REG, induction::dest_reg, EQ, expand_mult_add(), GE, gen_move_insn(), gen_reg_rtx(), gen_rtx_COMPARE, GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, iv_class::giv, induction::giv_type, GT, induction::ignore, INTVAL, LE, induction::location, loop_insn_emit_before(), loop_invariant_p(), loop_iv_add_mult_emit_before(), LT, induction::maybe_dead, MEM, mode, induction::mode, induction::mult_val, NE, induction::new_reg, induction::next_iv, NULL_RTX, PATTERN, REG, REG_IV_CLASS, REG_IV_TYPE, REG_POINTER, REGNO, rtx_equal_p(), SET, SET_DEST, SET_SRC, update_reg_last_use(), validate_change(), XEXP, XVECEXP, and XVECLEN.
Referenced by maybe_eliminate_biv(), and maybe_eliminate_biv_1().
| static void move_movables | ( | struct loop * | loop, | |
| struct loop_movables * | movables, | |||
| int | threshold, | |||
| int | insn_count | |||
| ) | [static] |
Definition at line 1796 of file loop.c.
References abort, add_label_notes(), AND, loop_regs::array, CALL_INSN_FUNCTION_USAGE, movable::cond, movable::consec, consec_sets_invariant_p(), copy_rtx(), count, delete_insn(), delete_insn_chain(), movable::dependencies, movable::done, emit_move_insn(), end_sequence(), expand_simple_binop(), find_reg_note(), first, flag_move_all_movables, movable::force, movable::forces, fprintf(), free(), GEN_INT, gen_lowpart_common(), gen_move_insn(), gen_rtx_EXPR_LIST, GET_CODE, get_insns(), GET_MODE, GET_MODE_BITSIZE, movable::global, loop_movables::head, HOST_WIDE_INT, i, i1, movable::insn, INSN_CODE, INSN_LUID, INSN_UID, movable::is_equiv, movable::lifetime, loop_call_insn_hoist(), loop_dump_stream, loop_insn_emit_after(), loop_insn_hoist(), loop_invariant_p(), LOOP_REGNO_NREGS, LOOP_REGS, movable::match, movable::move_insn, movable::move_insn_first, loop_reg::moved_once, n, loop_reg::n_times_set, movable::next, next, NEXT_INSN, nregs, NULL, NULL_RTX, loop_regs::num, OPTAB_LIB_WIDEN, p, movable::partial, PATTERN, REG, REG_EQUAL, REG_EQUIV, REG_LIBCALL, REG_NOTES, reg_referenced_p(), REG_RETVAL, movable::regno, REGNO_FIRST_LUID, REGNO_FIRST_UID, REGNO_LAST_LUID, REGNO_LAST_UID, regs, regs_may_share, remove_note(), replace_regs(), movable::savemode, movable::savings, SET, SET_DEST, movable::set_dest, loop_reg::set_in_loop, movable::set_src, SET_SRC, set_unique_reg_note(), start_sequence(), USE, xcalloc(), and XEXP.
Referenced by scan_loop().
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().
Definition at line 3158 of file loop.c.
References gen_rtx_EXPR_LIST, GET_CODE, GET_MODE, MEM, loop_info::num_mem_sets, RTX_UNCHANGING_P, loop_info::store_mems, loop_info::unknown_address_altered, and loop_info::unknown_constant_address_altered.
Referenced by prescan_loop().
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().
Definition at line 3193 of file loop.c.
References loop_regs::array, const0_rtx, FIRST_PSEUDO_REGISTER, GET_CODE, max_reg_before_loop, loop_regs::multiple_uses, REG, REGNO, regs, loop_reg::single_usage, and XEXP.
Referenced by check_dbra_loop().
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 HOST_WIDE_INT remove_constant_addition PARAMS | ( | (rtx *) | ) | [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 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 int basic_induction_var PARAMS | ( | (const struct loop *, rtx, enum machine_mode, rtx, rtx, rtx *, rtx *, rtx **) | ) | [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 record_biv PARAMS | ( | (struct loop *, struct induction *, rtx, rtx, rtx, rtx, rtx *, int, int) | ) | [static] |
| static int loop_giv_reduce_benefit PARAMS | ( | (struct loop *, struct iv_class *, struct induction *, rtx) | ) | [static] |
| static void loop_movables_add PARAMS | ( | (struct loop_movables *, struct movable *) | ) | [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 void combine_movables PARAMS | ( | (struct loop_movables *, struct loop_regs *) | ) | [static] |
| static void ignore_some_movables PARAMS | ( | (struct loop_movables *) | ) | [static] |
| static int labels_in_range_p PARAMS | ( | (rtx, int) | ) | [static] |
Definition at line 2456 of file loop.c.
References can_throw_internal(), const0_rtx, CONST_OR_PURE_CALL_P, current_function_calls_alloca, end, loop_info::first_loop_store_insn, flag_non_call_exceptions, for_each_rtx(), gen_rtx_EXPR_LIST, gen_rtx_MEM(), GET_CODE, loop_info::has_call, loop_info::has_indirect_jump, loop_info::has_multiple_exit_targets, loop_info::has_nonconst_call, loop_info::has_prefetch, loop_info::has_tablejump, loop_info::has_volatile, if(), insert_loop_mem(), movable::insn, LABEL_OUTSIDE_LOOP_P, LOOP_INFO, mem, loop_info::mems_idx, NEXT_INSN, next_nonnote_insn(), note_addr_stored(), NOTE_INSN_LOOP_BEG, NOTE_INSN_LOOP_END, NOTE_LINE_NUMBER, NOTE_PRECONDITIONED, note_stores(), NULL_RTX, loop_info::num_mem_sets, PATTERN, pc_rtx, pc_set(), loop_info::pre_header_has_call, loop_info::preconditioned, PREV_INSN, pure_call_p(), RTX_UNCHANGING_P, SET_SRC, src, start, loop_info::store_mems, loop_info::unknown_address_altered, loop_info::unknown_constant_address_altered, volatile_refs_p(), and XEXP.
Referenced by scan_loop().
Definition at line 7997 of file loop.c.
References end_sequence(), expand_mult(), GET_CODE, get_insns(), GET_MODE, INSN_P, n_insns, next, NEXT_INSN, NULL_RTX, PATTERN, SET, SET_SRC, start_sequence(), tmp, and XVECEXP.
Referenced by strength_reduce().
| 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] |
Definition at line 5664 of file loop.c.
References induction::add_val, induction::always_computable, induction::always_executed, iv_class::biv, iv_class::biv_count, bl, const1_rtx, induction::dest_reg, iv_class::eliminable, induction::ext_dependent, iv_class::final_value, GET_MODE, iv_class::giv, iv_class::giv_count, iv_class::incremented, iv_class::init_insn, iv_class::init_set, iv_class::initial_test, iv_class::initial_value, induction::insn, loop_ivs::list, induction::location, loop_biv_dump(), loop_dump_stream, LOOP_IVS, induction::maybe_multiple, induction::mode, induction::mult_val, iv_class::next, induction::next_iv, iv_class::nonneg, NULL_RTX, REG_IV_CLASS, iv_class::regno, REGNO, iv_class::reversed, induction::same, induction::src_reg, iv_class::total_benefit, and xmalloc().
Referenced by check_insn_for_bivs(), and iv_analyze_biv().
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] |
Definition at line 5765 of file loop.c.
References abort, induction::add_val, induction::always_computable, induction::always_executed, induction::auto_inc_opt, b, back_branch_in_range_p(), induction::benefit, iv_class::biv, bl, induction::cant_derive, induction::combined_with, const0_rtx, CONSTANT_P, induction::derive_adjustment, DEST_ADDR, DEST_REG, induction::dest_reg, induction::ext_dependent, induction::final_value, GENERAL_INDUCT, GET_CODE, GET_MODE, iv_class::giv, iv_class::giv_count, induction::giv_type, induction::ignore, induction::insn, INSN_LUID, INSN_UID, last_use_this_basic_block(), induction::lifetime, induction::location, loop_dump_stream, loop_giv_dump(), LOOP_IVS, LOOP_REG_LIFETIME, max_uid_for_loop, induction::maybe_dead, induction::maybe_multiple, induction::mode, induction::mult_val, induction::new_reg, induction::next_iv, induction::no_const_addval, induction::not_replaceable, PLUS, REG_IV_CLASS, REG_IV_INFO, REG_IV_TYPE, REGNO, REGNO_FIRST_LUID, REGNO_FIRST_UID, REGNO_LAST_LUID, induction::replaceable, induction::same, induction::same_insn, SET_DEST, induction::shared, simplify_rtx(), single_set, induction::src_reg, iv_class::total_benefit, induction::unrolled, and XEXP.
Referenced by check_insn_for_givs(), and find_mem_givs().
Definition at line 9205 of file loop.c.
References BASIC_INDUCT, bl, GET_CODE, iv_class::init_insn, iv_class::init_set, loop_ivs::n_regs, REG, REG_IV_CLASS, REG_IV_TYPE, and REGNO.
Referenced by loop_bivs_init_find().
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().
Definition at line 10563 of file loop.c.
References GET_CODE, LABEL_NUSES, new_label, NULL_RTX, old_label, and XEXP.
Referenced by load_mems(), outgoing_edges_match(), replace_label(), and try_crossjump_to_edge().
Definition at line 10451 of file loop.c.
References args, GET_CODE, loop_replace_args::insn, loop_replace_args::match, MEM, NULL_RTX, loop_replace_args::replacement, rtx_equal_p(), and validate_change().
Referenced by replace_loop_mems().
Definition at line 10487 of file loop.c.
References args, find_mem_in_note(), for_each_rtx(), loop_replace_args::insn, loop_replace_args::match, NULL_RTX, REG_EQUAL, REG_NOTE_KIND, REG_NOTES, replace_loop_mem(), loop_replace_args::replacement, rtx_varies_p(), sub, true_dependence(), validate_change(), and XEXP.
Referenced by load_mems().
Definition at line 10527 of file loop.c.
References args, loop_replace_args::insn, loop_replace_args::match, NULL_RTX, loop_replace_args::replacement, and validate_change().
Referenced by replace_loop_regs().
Definition at line 10544 of file loop.c.
References args, for_each_rtx(), loop_replace_args::insn, loop_replace_args::match, replace_loop_reg(), and loop_replace_args::replacement.
Referenced by try_copy_prop().
| static int rtx_equal_for_loop_p | ( | rtx | x, | |
| rtx | y, | |||
| struct loop_movables * | movables, | |||
| struct loop_regs * | regs | |||
| ) | [static] |
Definition at line 1635 of file loop.c.
References abort, loop_regs::array, CONSTANT_P, GET_CODE, GET_MODE, GET_RTX_FORMAT, GET_RTX_LENGTH, loop_movables::head, i, movable::move_insn, movable::next, REG, movable::regno, REGNO, regs_match_p(), rtx_equal_p(), movable::set_src, strcmp(), XEXP, XINT, XSTR, XVECEXP, XVECLEN, and XWINT.
Referenced by combine_movables(), and rtx_equal_for_loop_p().
Definition at line 3645 of file loop.c.
References abort, GET_CODE, GET_RTX_CLASS, GET_RTX_FORMAT, GET_RTX_LENGTH, strcmp(), XEXP, XINT, XSTR, XVECEXP, XVECLEN, and XWINT.
Referenced by emit_prefetch_instructions(), and rtx_equal_for_prefetch_p().
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().
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] |
Definition at line 6581 of file loop.c.
References abort, induction::add_val, loop_regs::array, BASIC_INDUCT, induction::benefit, induction::cant_derive, movable::consec, CONST, const0_rtx, const1_rtx, constm1_rtx, induction::derive_adjustment, induction::ext_dependent, find_reg_note(), GEN_INT, gen_rtx_fmt_e(), gen_rtx_MINUS, gen_rtx_MULT, gen_rtx_NEG, gen_rtx_PLUS, gen_rtx_USE, GENERAL_INDUCT, GET_CODE, GET_MODE, GET_MODE_BITSIZE, GET_MODE_CLASS, loop_movables::head, HOST_BITS_PER_WIDE_INT, HOST_WIDE_INT, movable::insn, INTVAL, loop_invariant_p(), LOOP_IVS, LOOP_MOVABLES, LOOP_REGS, movable::match, max_reg_before_loop, MINUS, mode, MODE_INT, induction::mult_val, movable::next, NEXT_INSN, NOT, NULL_RTX, PLUS, REG, REG_EQUAL, REG_IV_INFO, REG_IV_TYPE, REGNO, regs, rtx_equal_p(), movable::set_dest, SET_SRC, sge_plus(), sge_plus_constant(), SIGN_EXTEND, single_set, loop_reg::single_usage, induction::src_reg, TRUNCATE, USE, and XEXP.
Referenced by general_induction_var(), simplify_giv_expr(), and update_giv_derive().
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().
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] |
Definition at line 10211 of file loop.c.
References abort, apply_change_group(), find_reg_note(), first, fprintf(), GET_CODE, INSN_P, INSN_UID, loop_delete_insns(), loop_dump_stream, next_insn_in_loop(), note_reg_stored(), note_stores(), NULL, NULL_RTX, PATTERN, REG, note_reg_stored_arg::reg, REG_EQUAL, reg_mentioned_p(), REG_RETVAL, REGNO, REGNO_FIRST_UID, REGNO_LAST_UID, regno_reg_rtx, remove_note(), replace_loop_regs(), SET_DEST, note_reg_stored_arg::set_seen, single_set, and XEXP.
Referenced by load_mems(), and try_swap_copy_prop().
| static void try_swap_copy_prop | ( | struct loop * | loop, | |
| rtx | replacement, | |||
| unsigned int | regno | |||
| ) | const [static] |
Definition at line 10337 of file loop.c.
References apply_change_group(), fprintf(), GET_CODE, INSN_P, INSN_UID, loop_dump_stream, next_insn_in_loop(), NULL_RTX, PREV_INSN, prev_insn, REG, REGNO, REGNO_FIRST_UID, SET_DEST, SET_SRC, single_set, try_copy_prop(), and validate_change().
Referenced by load_mems().
Definition at line 6133 of file loop.c.
References induction::add_val, induction::always_computable, iv_class::biv, bl, induction::cant_derive, const0_rtx, const1_rtx, induction::derive_adjustment, gen_rtx_MULT, gen_rtx_PLUS, GET_CODE, iv_class::giv, induction::insn, loop_ivs::list, LOOP_IVS, induction::maybe_multiple, induction::mode, induction::mult_val, iv_class::next, induction::next_iv, induction::replaceable, and simplify_giv_expr().
Referenced by check_insn_for_givs().
Definition at line 9234 of file loop.c.
References GET_CODE, GET_RTX_FORMAT, GET_RTX_LENGTH, INSN_LUID, INSN_UID, max_reg_before_loop, max_uid_for_loop, REG, REGNO, REGNO_LAST_LUID, REGNO_LAST_UID, XEXP, XVECEXP, and XVECLEN.
Referenced by loop_iv_add_mult_emit_before(), loop_iv_add_mult_sink(), maybe_eliminate_biv_1(), and update_reg_last_use().
Definition at line 5533 of file loop.c.
References call_used_regs, CONSTANT_P, FIRST_PSEUDO_REGISTER, GET_CODE, max_reg_before_loop, REG, reg_set_between_p(), REGNO, and SMALL_REGISTER_CLASSES.
Referenced by loop_bivs_check(), and loop_bivs_init_find().
rtx addr_placeholder [static] |
int copy_cost [static] |
Definition at line 397 of file loop.c.
Referenced by combine_givs(), copy_cost(), init_loop(), loop_giv_reduce_benefit(), and record_reg_classes().
int indirect_jump_in_function [static] |
Definition at line 233 of file loop.c.
Referenced by check_dbra_loop(), check_ext_dependent_givs(), check_final_value(), combine_givs(), emit_prefetch_instructions(), final_biv_value(), final_giv_value(), find_and_verify_loops(), find_splittable_givs(), find_splittable_regs(), load_mems(), loop_biv_eliminable_p(), loop_bivs_check(), loop_bivs_find(), loop_delete_insns(), loop_givs_rescan(), loop_iterations(), loop_optimize(), mark_loop_jump(), maybe_eliminate_biv(), move_movables(), precondition_loop_p(), record_biv(), record_giv(), scan_loop(), strength_reduce(), try_copy_prop(), try_swap_copy_prop(), and unroll_loop().
int loop_max_reg [static] |
int max_loop_num [static] |
int max_luid [static] |
| unsigned int max_reg_before_loop |
Definition at line 183 of file loop.c.
Referenced by check_insn_for_bivs(), check_insn_for_givs(), find_splittable_givs(), loop_bivs_init_find(), loop_givs_reduce(), loop_optimize(), note_set_pseudo_multiple_uses(), precondition_loop_p(), scan_loop(), simplify_giv_expr(), strength_reduce(), unroll_loop(), update_reg_last_use(), and valid_initial_value_p().
| int max_uid_for_loop |
Definition at line 170 of file loop.c.
Referenced by compute_luids(), find_and_verify_loops(), find_splittable_regs(), load_mems(), loop_biv_eliminable_p(), loop_givs_reduce(), loop_insn_first_p(), loop_iterations(), loop_optimize(), record_giv(), scan_loop(), unroll_loop(), and update_reg_last_use().
int reg_address_cost [static] |
Definition at line 400 of file loop.c.
Referenced by combine_givs(), general_induction_var(), and init_loop().
| int* uid_luid |
1.5.6