re PR debug/52001 (Huge compile-time regression with var-tracking)

PR debug/52001
	* var-tracking.c (reverse_op): Don't add any reverse operation
	if V already has any constant locations.

From-SVN: r183608
This commit is contained in:
Jakub Jelinek 2012-01-27 10:26:48 +01:00 committed by Jakub Jelinek
parent 1228a6a69b
commit ae25db4568
2 changed files with 15 additions and 0 deletions

View File

@ -1,3 +1,9 @@
2012-01-27 Jakub Jelinek <jakub@redhat.com>
PR debug/52001
* var-tracking.c (reverse_op): Don't add any reverse operation
if V already has any constant locations.
2012-01-27 Sandra Loosemore <sandra@codesourcery.com>
* doc/invoke.texi: Correct usage of "command line" (noun)

View File

@ -5298,6 +5298,7 @@ reverse_op (rtx val, const_rtx expr, rtx insn)
{
rtx src, arg, ret;
cselib_val *v;
struct elt_loc_list *l;
enum rtx_code code;
if (GET_CODE (expr) != SET)
@ -5333,6 +5334,14 @@ reverse_op (rtx val, const_rtx expr, rtx insn)
if (!v || !cselib_preserved_value_p (v))
return;
/* Adding a reverse op isn't useful if V already has an always valid
location. Ignore ENTRY_VALUE, while it is always constant, we should
prefer non-ENTRY_VALUE locations whenever possible. */
for (l = v->locs; l; l = l->next)
if (CONSTANT_P (l->loc)
&& (GET_CODE (l->loc) != CONST || !references_value_p (l->loc, 0)))
return;
switch (GET_CODE (src))
{
case NOT: