This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Fix PR tree-opt/16808, Vops are not being renamed



On Nov 2, 2004, at 9:21 AM, Diego Novillo wrote:


On Mon, 2004-11-01 at 23:35, Andrew Pinski wrote:

ChangeLog:
* tree-ssa.c (replace_immediate_uses): If we call fold_stmt, make sure
that the vops get marked for renaming.


Sounds like the right direction, but tested on? Test case?

Woops bootstrapped and tested on powerpc-darwin with no regressions.


Testcase goes in gcc.c-torture/compile:
double exp(double);
void f0(void);
void f(double);
typedef struct Parser {
    int x;
    char *s;
} Parser;
static double pop(Parser *p) {
    if (p->s[0] <= 0) {
	f0();
	return 0;
    }
    --p->x;
    return 0;
}
static void evalFactor(Parser *p) {
    while (p->x)
	f(exp(pop(p)));
}
static void evalTerm(Parser *p) {
    while (p->s[0])
	evalFactor(p);
}
static void evalExpression(Parser *p) {
    evalTerm(p);
    while (p->s[0])
	evalTerm(p);
}
void evalPrimary(Parser *p) {
    if (p->s)
	return;
    evalExpression(p);
}

Thanks,
Andrew Pinski


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]