Commit f0686e78 by Alexandre Oliva Committed by Alexandre Oliva

params.def (PARAM_MAX_VARTRACK_EXPR_DEPTH): New.

* params.def (PARAM_MAX_VARTRACK_EXPR_DEPTH): New.
* doc/invoke.texi: Document max-vartrack-expr-depth.
* var-tracking.c (EXPR_DEPTH): New.
(reverse_op, vt_expand_loc, vt_expand_loc_dummy): Use it.

From-SVN: r174494
parent f3308413
2011-05-31 Alexandre Oliva <aoliva@redhat.com> 2011-05-31 Alexandre Oliva <aoliva@redhat.com>
* params.def (PARAM_MAX_VARTRACK_EXPR_DEPTH): New.
* doc/invoke.texi: Document max-vartrack-expr-depth.
* var-tracking.c (EXPR_DEPTH): New.
(reverse_op, vt_expand_loc, vt_expand_loc_dummy): Use it.
2011-05-31 Alexandre Oliva <aoliva@redhat.com>
* config/i386/i386.c (ix86_rtx_costs): Drop NEG from sub for FMA. * config/i386/i386.c (ix86_rtx_costs): Drop NEG from sub for FMA.
* config/i386/sse.md: Add n to negated FMA pattern names. * config/i386/sse.md: Add n to negated FMA pattern names.
......
...@@ -8940,6 +8940,16 @@ the function. If the limit is exceeded even without debug insns, var ...@@ -8940,6 +8940,16 @@ the function. If the limit is exceeded even without debug insns, var
tracking analysis is completely disabled for the function. Setting tracking analysis is completely disabled for the function. Setting
the parameter to zero makes it unlimited. the parameter to zero makes it unlimited.
@item max-vartrack-expr-depth
Sets a maximum number of recursion levels when attempting to map
variable names or debug temporaries to value expressions. This trades
compile time for more complete debug information. If this is set too
low, value expressions that are available and could be represented in
debug information may end up not being used; setting this higher may
enable the compiler to find more complex debug expressions, but compile
time may grow exponentially, and even then, it may fail to find more
usable expressions. The default is 10.
@item min-nondebug-insn-uid @item min-nondebug-insn-uid
Use uids starting at this parameter for nondebug insns. The range below Use uids starting at this parameter for nondebug insns. The range below
the parameter is reserved exclusively for debug insns created by the parameter is reserved exclusively for debug insns created by
......
...@@ -839,6 +839,14 @@ DEFPARAM (PARAM_MAX_VARTRACK_SIZE, ...@@ -839,6 +839,14 @@ DEFPARAM (PARAM_MAX_VARTRACK_SIZE,
"Max. size of var tracking hash tables", "Max. size of var tracking hash tables",
50000000, 0, 0) 50000000, 0, 0)
/* Set maximum recursion depth for var tracking expression expansion
and resolution. */
DEFPARAM (PARAM_MAX_VARTRACK_EXPR_DEPTH,
"max-vartrack-expr-depth",
"Max. recursion depth for expanding var tracking expressions",
10, 0, 0)
/* Set minimum insn uid for non-debug insns. */ /* Set minimum insn uid for non-debug insns. */
DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID, DEFPARAM (PARAM_MIN_NONDEBUG_INSN_UID,
......
...@@ -5215,6 +5215,8 @@ add_uses_1 (rtx *x, void *cui) ...@@ -5215,6 +5215,8 @@ add_uses_1 (rtx *x, void *cui)
for_each_rtx (x, add_uses, cui); for_each_rtx (x, add_uses, cui);
} }
#define EXPR_DEPTH (PARAM_VALUE (PARAM_MAX_VARTRACK_EXPR_DEPTH))
/* Attempt to reverse the EXPR operation in the debug info. Say for /* Attempt to reverse the EXPR operation in the debug info. Say for
reg1 = reg2 + 6 even when reg2 is no longer live we reg1 = reg2 + 6 even when reg2 is no longer live we
can express its value as VAL - 6. */ can express its value as VAL - 6. */
...@@ -5286,7 +5288,7 @@ reverse_op (rtx val, const_rtx expr) ...@@ -5286,7 +5288,7 @@ reverse_op (rtx val, const_rtx expr)
arg = XEXP (src, 1); arg = XEXP (src, 1);
if (!CONST_INT_P (arg) && GET_CODE (arg) != SYMBOL_REF) if (!CONST_INT_P (arg) && GET_CODE (arg) != SYMBOL_REF)
{ {
arg = cselib_expand_value_rtx (arg, scratch_regs, 5); arg = cselib_expand_value_rtx (arg, scratch_regs, EXPR_DEPTH);
if (arg == NULL_RTX) if (arg == NULL_RTX)
return NULL_RTX; return NULL_RTX;
if (!CONST_INT_P (arg) && GET_CODE (arg) != SYMBOL_REF) if (!CONST_INT_P (arg) && GET_CODE (arg) != SYMBOL_REF)
...@@ -7416,7 +7418,7 @@ vt_expand_loc (rtx loc, htab_t vars, bool ignore_cur_loc) ...@@ -7416,7 +7418,7 @@ vt_expand_loc (rtx loc, htab_t vars, bool ignore_cur_loc)
data.dummy = false; data.dummy = false;
data.cur_loc_changed = false; data.cur_loc_changed = false;
data.ignore_cur_loc = ignore_cur_loc; data.ignore_cur_loc = ignore_cur_loc;
loc = cselib_expand_value_rtx_cb (loc, scratch_regs, 8, loc = cselib_expand_value_rtx_cb (loc, scratch_regs, EXPR_DEPTH,
vt_expand_loc_callback, &data); vt_expand_loc_callback, &data);
if (loc && MEM_P (loc)) if (loc && MEM_P (loc))
...@@ -7438,7 +7440,7 @@ vt_expand_loc_dummy (rtx loc, htab_t vars, bool *pcur_loc_changed) ...@@ -7438,7 +7440,7 @@ vt_expand_loc_dummy (rtx loc, htab_t vars, bool *pcur_loc_changed)
data.dummy = true; data.dummy = true;
data.cur_loc_changed = false; data.cur_loc_changed = false;
data.ignore_cur_loc = false; data.ignore_cur_loc = false;
ret = cselib_dummy_expand_value_rtx_cb (loc, scratch_regs, 8, ret = cselib_dummy_expand_value_rtx_cb (loc, scratch_regs, EXPR_DEPTH,
vt_expand_loc_callback, &data); vt_expand_loc_callback, &data);
*pcur_loc_changed = data.cur_loc_changed; *pcur_loc_changed = data.cur_loc_changed;
return ret; return ret;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment