
2005-04-22 Diego Novillo <dnovillo@redhat.com> * Makefile.in (tree-into-ssa.o): Add dependency on PARAMS_H. * lambda-code.c (perfect_nestify): Mark virtual operands in the moved statement for renaming. * params.def (PARAM_MIN_VIRTUAL_MAPPINGS): Define. (PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO): Define. * params.h (MIN_VIRTUAL_MAPPINGS): Define. (VIRTUAL_MAPPINGS_TO_SYMS_RATIO): Define. * tree-flow.h (struct var_ann_d): Update comments. (rewrite_to_new_ssa_names_bb, rewrite_to_new_ssa_names, allocate_ssa_names, find_phi_node_for, dump_tree_ssa, debug_tree_ssa, debug_def_blocks, dump_tree_ssa_stats, debug_tree_ssa_stats, rewrite_ssa_into_ssa, dump_repl_tbl, debug_repl_tbl, dump_names_replaced_by, debug_names_replaced_by): Remove declarations. (delete_update_ssa, get_current_def, set_current_def): Declare. (rewrite_into_loop_closed_ssa): Add new argument. Update all callers. * tree-into-ssa.c: Include params.h. (old_virtual_ssa_names): Remove. Update all users. (need_to_replace_names_p): Remove. Update all users. (struct update_ssa_stats_d): Declare. (update_ssa_stats): New local. (dump_tree_ssa, debug_tree_ssa, debug_def_blocks, dump_tree_ssa_stats, debug_tree_ssa_stats, dump_update_ssa, debug_update_ssa, dump_names_replaced_by, debug_names_replaced_by): Declare. (get_current_def, set current_def): Make extern. (is_old_name, is_new_name): Protect against references past the end of the sets. (add_new_name_mapping): Assert that OLD and NEW are different SSA names for the same symbol. When adding a virtual mapping, update stats for virtual mapping heuristic. (insert_phi_nodes_for): If UPDATE_P is true, create the LHS of the new PHI by duplicating SSA name VAR. (insert_phi_nodes_1): Remove. Update all users. (insert_phi_nodes): Remove second argument. Update all users. (maybe_replace_use, maybe_replace_def): New. (rewrite_update_stmt): Call them. (mark_def_interesting): Remove calls to is_gimple_reg. (prepare_phi_args_for_update): Remove. Update all users. (prepare_block_for_update): Only process virtual operands and GIMPLE registers in normal form. (prepare_use_sites_for): New. (prepare_names_to_update): Rename from prepare_def_sites. Call prepare_use_sites_for. (dump_update_ssa): Rename from dump_repl_tbl. Update all users. Show statistics for virtual mapping heuristic. (debug_update_ssa): Rename from debug_debug_repl_tbl. (init_update_ssa): Initialize UPDATE_SSA_STATS. (delete_update_ssa): Make extern. (mark_set_for_renaming): If the set is empty, do nothing. (release_ssa_name_after_update_ssa): Update comment. (insert_updated_phi_nodes_for): Do not remove existing PHI nodes for symbols. (switch_virtuals_to_full_rewrite_p): New. (switch_virtuals_to_full_rewrite): New. (update_ssa): Call them. Clear REWRITE_THIS_STMT and REGISTER_DEFS_IN_THIS_STMT for every statement before updating. If all the names in NEW_SSA_NAMES have been marked for removal, do nothing. Only start at the top of the CFG if there are symbols in SYMS_TO_RENAME. (ssa_rewrite_finalize_block): Remove. (ssa_register_new_def): Remove. (ssa_rewrite_stmt): Remove. (ssa_rewrite_phi_arguments): Remove. (ssa_rewrite_initialize_block): Remove. (ssa_mark_def_sites): Remove. (ssa_mark_def_sites_initialize_block): Remove. (ssa_mark_phi_uses): Remove. (rewrite_ssa_into_ssa): Remove. * tree-phinodes.c (find_phi_node_for): Remove. * tree-ssa-loop-ivcanon.c (try_unroll_loop_completely): Call update_ssa. * tree-ssa-loop-unswitch.c (tree_ssa_unswitch_loops): Remove calls to verify_dominators and verify_loop_structure. (tree_unswitch_single_loop): Call update_ssa. * tree-ssa.c (verify_ssa): Assert that need_ssa_update_p returns false. Call verify_stmts. (delete_tree_ssa): Assert that need_ssa_update_p returns false. * tree-vect-transform.c (vect_transform_loop): Call update_ssa. * tree-vectorizer.c (allocate_new_names, rename_def_op, free_new_names): Remove. Update all users. (rename_use_op): Call get_current_def. (rename_variables_in_bb): Do not handle any real or virtual definition. (slpeel_update_phis_for_duplicate_loop): Call get_current_def and set_current_def instead of using SSA_NAME_AUX. (slpeel_update_phi_nodes_for_guard2): Reformat comments. (slpeel_can_duplicate_loop_p): Call need_ssa_update_p, ssa_names_to_replace and delete_update_ssa. * doc/invoke.texi: Document --param min-virtual-mappings and --param virtual-mappings-ratio. 2005-04-22 Zdenek Dvorak <dvorakz@suse.cz> Diego Novillo <dnovillo@redhat.com> * tree-cfg.c (tree_duplicate_bb): Call create_new_def_for for newly created PHI nodes. Call create_new_def_for for every new V_MAY_DEF and V_MUST_DEF on the copied statement. (struct ssa_name_map_entry): Remove. (ssa_name_map_entry_hash): Remove. (ssa_name_map_entry_eq): Remove. (allocate_ssa_names): Remove. (rewrite_to_new_ssa_names_def): Remove. (rewrite_to_new_ssa_names_use): Remove. (rewrite_to_new_ssa_names_bb): Remove. (rewrite_to_new_ssa_names): Remove. (tree_duplicate_sese_region): Remove variables ver, definitions, phi, ssa_name_map and bi. Call need_ssa_update_p instead of any_marked_for_rewrite_p. Call update_ssa. * tree-ssa-dom.c (tree_ssa_dominator_optimize): Call update_ssa instead of rewrite_ssa_into_ssa. * tree-ssa-loop-manip.c (add_exit_phis_edge): Call create_new_def_for. (find_uses_to_rename_use): Add argument 'need_phis'. (find_uses_to_rename_stmt): Do not scan virtual operands. (find_uses_to_rename): Only scan PHI nodes for non-virtual names. (rewrite_into_loop_closed_ssa): Call update_ssa. (check_loop_closed_ssa_use): Ignore virtual operands. (check_loop_closed_ssa_stmt): Likewise. (verify_loop_closed_ssa): Do nothing if CURRENT_LOOPS is NULL. (rename_variables, set_phi_def_stmts): Remove. (tree_duplicate_loop_to_header_edge): Reformat comment. Remove variables BB, I and DEFINITIONS. Call need_ssa_update_p. Call update_ssa. (lv_adjust_loop_header_phi): Reformat comment. * tree-ssanames.c (ssa_names_to_rewrite): Remove. (marked_for_rewrite_p, any_marked_for_rewrite_p, mark_for_rewrite, unmark_all_for_rewrite, marked_ssa_names): Remove. Update all users. (release_ssa_name): If VAR has been registered for SSA updating, do nothing. * tree-vrp.c (new_ssa_names, old_ssa_names): Remove. (build_assert_expr_for): Call register_new_name_mapping. (insert_range_assertions): Update call to update_ssa. * tree.h (mark_for_rewrite, unmark_all_for_rewrite, marked_for_rewrite_p, any_marked_for_rewrite_p, marked_ssa_names): Remove. From-SVN: r98599
146 lines
4.8 KiB
C
146 lines
4.8 KiB
C
/* params.h - Run-time parameters.
|
||
Copyright (C) 2001, 2003, 2004, 2005 Free Software Foundation, Inc.
|
||
Written by Mark Mitchell <mark@codesourcery.com>.
|
||
|
||
This file is part of GCC.
|
||
|
||
GCC is free software; you can redistribute it and/or modify it under
|
||
the terms of the GNU General Public License as published by the Free
|
||
Software Foundation; either version 2, or (at your option) any later
|
||
version.
|
||
|
||
GCC is distributed in the hope that it will be useful, but WITHOUT ANY
|
||
WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
||
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||
for more details.
|
||
|
||
You should have received a copy of the GNU General Public License
|
||
along with GCC; see the file COPYING. If not, write to the Free
|
||
Software Foundation, 59 Temple Place - Suite 330, Boston, MA
|
||
02111-1307, USA.
|
||
|
||
*/
|
||
|
||
/* This module provides a means for setting integral parameters
|
||
dynamically. Instead of encoding magic numbers in various places,
|
||
use this module to organize all the magic numbers in a single
|
||
place. The values of the parameters can be set on the
|
||
command-line, thereby providing a way to control the amount of
|
||
effort spent on particular optimization passes, or otherwise tune
|
||
the behavior of the compiler.
|
||
|
||
Since their values can be set on the command-line, these parameters
|
||
should not be used for non-dynamic memory allocation. */
|
||
|
||
#ifndef GCC_PARAMS_H
|
||
#define GCC_PARAMS_H
|
||
|
||
/* No parameter shall have this value. */
|
||
|
||
#define INVALID_PARAM_VAL (-1)
|
||
|
||
/* The information associated with each parameter. */
|
||
|
||
typedef struct param_info
|
||
{
|
||
/* The name used with the `--param <name>=<value>' switch to set this
|
||
value. */
|
||
const char *const option;
|
||
/* The associated value. */
|
||
int value;
|
||
|
||
/* Minimum acceptable value. */
|
||
int min_value;
|
||
|
||
/* Maximum acceptable value, if greater than minimum */
|
||
int max_value;
|
||
|
||
/* A short description of the option. */
|
||
const char *const help;
|
||
} param_info;
|
||
|
||
/* An array containing the compiler parameters and their current
|
||
values. */
|
||
|
||
extern param_info *compiler_params;
|
||
|
||
/* Add the N PARAMS to the current list of compiler parameters. */
|
||
|
||
extern void add_params (const param_info params[], size_t n);
|
||
|
||
/* Set the VALUE associated with the parameter given by NAME. */
|
||
|
||
extern void set_param_value (const char *name, int value);
|
||
|
||
|
||
/* The parameters in use by language-independent code. */
|
||
|
||
typedef enum compiler_param
|
||
{
|
||
#define DEFPARAM(enumerator, option, msgid, default, min, max) \
|
||
enumerator,
|
||
#include "params.def"
|
||
#undef DEFPARAM
|
||
LAST_PARAM
|
||
} compiler_param;
|
||
|
||
/* The value of the parameter given by ENUM. */
|
||
#define PARAM_VALUE(ENUM) \
|
||
(compiler_params[(int) ENUM].value)
|
||
|
||
/* Macros for the various parameters. */
|
||
#define SALIAS_MAX_IMPLICIT_FIELDS \
|
||
PARAM_VALUE (PARAM_SALIAS_MAX_IMPLICIT_FIELDS)
|
||
#define SRA_MAX_STRUCTURE_SIZE \
|
||
PARAM_VALUE (PARAM_SRA_MAX_STRUCTURE_SIZE)
|
||
#define SRA_FIELD_STRUCTURE_RATIO \
|
||
PARAM_VALUE (PARAM_SRA_FIELD_STRUCTURE_RATIO)
|
||
#define MAX_INLINE_INSNS_SINGLE \
|
||
PARAM_VALUE (PARAM_MAX_INLINE_INSNS_SINGLE)
|
||
#define MAX_INLINE_INSNS \
|
||
PARAM_VALUE (PARAM_MAX_INLINE_INSNS)
|
||
#define MAX_INLINE_SLOPE \
|
||
PARAM_VALUE (PARAM_MAX_INLINE_SLOPE)
|
||
#define MIN_INLINE_INSNS \
|
||
PARAM_VALUE (PARAM_MIN_INLINE_INSNS)
|
||
#define MAX_INLINE_INSNS_AUTO \
|
||
PARAM_VALUE (PARAM_MAX_INLINE_INSNS_AUTO)
|
||
#define MAX_VARIABLE_EXPANSIONS \
|
||
PARAM_VALUE (PARAM_MAX_VARIABLE_EXPANSIONS)
|
||
#define MAX_DELAY_SLOT_INSN_SEARCH \
|
||
PARAM_VALUE (PARAM_MAX_DELAY_SLOT_INSN_SEARCH)
|
||
#define MAX_DELAY_SLOT_LIVE_SEARCH \
|
||
PARAM_VALUE (PARAM_MAX_DELAY_SLOT_LIVE_SEARCH)
|
||
#define MAX_PENDING_LIST_LENGTH \
|
||
PARAM_VALUE (PARAM_MAX_PENDING_LIST_LENGTH)
|
||
#define MAX_GCSE_MEMORY \
|
||
((size_t) PARAM_VALUE (PARAM_MAX_GCSE_MEMORY))
|
||
#define MAX_GCSE_PASSES \
|
||
PARAM_VALUE (PARAM_MAX_GCSE_PASSES)
|
||
#define GCSE_AFTER_RELOAD_PARTIAL_FRACTION \
|
||
PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_PARTIAL_FRACTION)
|
||
#define GCSE_AFTER_RELOAD_CRITICAL_FRACTION \
|
||
PARAM_VALUE (PARAM_GCSE_AFTER_RELOAD_CRITICAL_FRACTION)
|
||
#define MAX_UNROLLED_INSNS \
|
||
PARAM_VALUE (PARAM_MAX_UNROLLED_INSNS)
|
||
#define MAX_SMS_LOOP_NUMBER \
|
||
PARAM_VALUE (PARAM_MAX_SMS_LOOP_NUMBER)
|
||
#define SMS_MAX_II_FACTOR \
|
||
PARAM_VALUE (PARAM_SMS_MAX_II_FACTOR)
|
||
#define SMS_DFA_HISTORY \
|
||
PARAM_VALUE (PARAM_SMS_DFA_HISTORY)
|
||
#define SMS_LOOP_AVERAGE_COUNT_THRESHOLD \
|
||
PARAM_VALUE (PARAM_SMS_LOOP_AVERAGE_COUNT_THRESHOLD)
|
||
#define GLOBAL_VAR_THRESHOLD \
|
||
PARAM_VALUE (PARAM_GLOBAL_VAR_THRESHOLD)
|
||
#define MAX_ALIASED_VOPS \
|
||
PARAM_VALUE (PARAM_MAX_ALIASED_VOPS)
|
||
#define INTEGER_SHARE_LIMIT \
|
||
PARAM_VALUE (PARAM_INTEGER_SHARE_LIMIT)
|
||
#define MAX_LAST_VALUE_RTL \
|
||
PARAM_VALUE (PARAM_MAX_LAST_VALUE_RTL)
|
||
#define MIN_VIRTUAL_MAPPINGS \
|
||
PARAM_VALUE (PARAM_MIN_VIRTUAL_MAPPINGS)
|
||
#define VIRTUAL_MAPPINGS_TO_SYMS_RATIO \
|
||
PARAM_VALUE (PARAM_VIRTUAL_MAPPINGS_TO_SYMS_RATIO)
|
||
#endif /* ! GCC_PARAMS_H */
|