Makefile.in (bubblestrap): Don't require a previous full bootstrap.

* Makefile.in (bubblestrap): Don't require a previous full
        bootstrap.

        * expr.c (mostly_zeros_p): No longer static.
        * tree.h: Declare it.
        * stmt.c (resolve_asm_operand_names): Don't copy the pattern
        unless we need to do substitutions.

From-SVN: r70031
This commit is contained in:
Jason Merrill 2003-07-31 20:37:40 -04:00 committed by Jason Merrill
parent 2598550fa6
commit 4020919528
5 changed files with 72 additions and 32 deletions

View File

@ -1,3 +1,13 @@
2003-07-31 Jason Merrill <jason@redhat.com>
* Makefile.in (bubblestrap): Don't require a previous full
bootstrap.
* expr.c (mostly_zeros_p): No longer static.
* tree.h: Declare it.
* stmt.c (resolve_asm_operand_names): Don't copy the pattern
unless we need to do substitutions.
2003-07-31 Roger Sayle <roger@eyesopen.com>
* fold-const.c (fold <MULT_EXPR>): Optimize both x*pow(x,c) and

View File

@ -3647,18 +3647,26 @@ restageprofile: unstageprofile
restagefeedback: unstagefeedback
$(MAKE) LANGUAGES="$(LANGUAGES)" stagefeedback_build
# Bubble up a bugfix through all the stages. Primarily useful for fixing
# bugs that cause the compiler to crash while building stage 2.
bubblestrap:
if test -f stage3_build; then true; else \
echo; echo You must \"make bootstrap\" first.; \
exit 1; \
if test -f stage_last; then \
LAST=`cat stage_last|sed -e 's/_build//'`; \
if test "$$LAST" != "stage1"; then \
$(MAKE) $$LAST; \
$(STAMP) $${LAST}_copy; \
fi; \
fi
if test -f stage1_copy; then $(MAKE) unstage1; fi
$(MAKE) LANGUAGES="$(LANGUAGES)" stage1_copy
if test -f stage2_copy; then $(MAKE) unstage2; fi
$(MAKE) LANGUAGES="$(LANGUAGES)" stage2_copy
if test -f stage3_copy; then $(MAKE) unstage3; fi
$(MAKE) LANGUAGES="$(LANGUAGES)" stage3_build
if test -f stage4_copy; then \
$(MAKE) stage3_copy; $(MAKE) unstage4; \
$(MAKE) LANGUAGES="$(LANGUAGES)" stage4_build || exit 1; \
fi
for i in stage3 \
unstage1 stage1_build stage1_copy \
unstage2 stage2_build stage2_copy \
unstage3 stage3_build ; \
do \
$(MAKE) LANGUAGES="$(LANGUAGES)" $$i || exit 1 ; \
done
quickstrap:
if test -f stage_last ; then \

View File

@ -151,7 +151,6 @@ static tree clear_storage_libcall_fn (int);
static rtx compress_float_constant (rtx, rtx);
static rtx get_subtarget (rtx);
static int is_zeros_p (tree);
static int mostly_zeros_p (tree);
static void store_constructor_field (rtx, unsigned HOST_WIDE_INT,
HOST_WIDE_INT, enum machine_mode,
tree, tree, int, int);
@ -4766,7 +4765,7 @@ store_expr (tree exp, rtx target, int want_value)
return target;
}
/* Return 1 if EXP just contains zeros. */
/* Return 1 if EXP just contains zeros. FIXME merge with initializer_zerop. */
static int
is_zeros_p (tree exp)
@ -4815,7 +4814,7 @@ is_zeros_p (tree exp)
/* Return 1 if EXP contains mostly (3/4) zeros. */
static int
int
mostly_zeros_p (tree exp)
{
if (TREE_CODE (exp) == CONSTRUCTOR)

View File

@ -1992,13 +1992,14 @@ resolve_asm_operand_names (tree string, tree outputs, tree inputs)
{
char *buffer;
char *p;
const char *c;
tree t;
/* Substitute [<name>] in input constraint strings. There should be no
named operands in output constraints. */
for (t = inputs; t ; t = TREE_CHAIN (t))
{
const char *c = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
c = TREE_STRING_POINTER (TREE_VALUE (TREE_PURPOSE (t)));
if (strchr (c, '[') != NULL)
{
p = buffer = xstrdup (c);
@ -2010,31 +2011,48 @@ resolve_asm_operand_names (tree string, tree outputs, tree inputs)
}
}
if (strchr (TREE_STRING_POINTER (string), '[') == NULL)
return string;
/* Assume that we will not need extra space to perform the substitution.
This because we get to remove '[' and ']', which means we cannot have
a problem until we have more than 999 operands. */
p = buffer = xstrdup (TREE_STRING_POINTER (string));
while ((p = strchr (p, '%')) != NULL)
/* Now check for any needed substitutions in the template. */
c = TREE_STRING_POINTER (string);
while ((c = strchr (c, '%')) != NULL)
{
if (p[1] == '[')
p += 1;
else if (ISALPHA (p[1]) && p[2] == '[')
p += 2;
if (c[1] == '[')
break;
else if (ISALPHA (c[1]) && c[2] == '[')
break;
else
{
p += 1;
c += 1;
continue;
}
p = resolve_operand_name_1 (p, outputs, inputs);
}
string = build_string (strlen (buffer), buffer);
free (buffer);
if (c)
{
/* OK, we need to make a copy so we can perform the substitutions.
Assume that we will not need extra space--we get to remove '['
and ']', which means we cannot have a problem until we have more
than 999 operands. */
buffer = xstrdup (TREE_STRING_POINTER (string));
p = buffer + (c - TREE_STRING_POINTER (string));
while ((p = strchr (p, '%')) != NULL)
{
if (p[1] == '[')
p += 1;
else if (ISALPHA (p[1]) && p[2] == '[')
p += 2;
else
{
p += 1;
continue;
}
p = resolve_operand_name_1 (p, outputs, inputs);
}
string = build_string (strlen (buffer), buffer);
free (buffer);
}
return string;
}

View File

@ -2445,6 +2445,11 @@ extern int fields_length (tree);
extern bool initializer_zerop (tree);
/* Given an initializer INIT, return TRUE if INIT is at least 3/4 zeros.
Otherwise return FALSE. */
extern int mostly_zeros_p (tree);
/* integer_zerop (tree x) is nonzero if X is an integer constant of value 0 */
extern int integer_zerop (tree);