Skip to content

Commit

Permalink
Merge pull request #3819 from WalterBright/fix13193
Browse files Browse the repository at this point in the history
[reg] fix Issue 13193 - Extreme slowdown in compilation time of OpenSSL in Tango for optimized build
  • Loading branch information
9rnsr committed Jul 28, 2014
1 parent aa2b31e commit 0ee4cb4
Show file tree
Hide file tree
Showing 2 changed files with 129 additions and 13 deletions.
16 changes: 3 additions & 13 deletions src/backend/gother.c
Expand Up @@ -921,9 +921,9 @@ void copyprop()
/* and the d=b copy elem now reaches the end */
/* of the block (the d=a elem didn't). */
}
if (recalc)
goto Lagain;
}
if (recalc)
goto Lagain;
}

/*****************************
Expand All @@ -940,8 +940,6 @@ STATIC void cpwalk(register elem *n,vec_t IN)

assert(n && IN);
/*chkvecdim(exptop,0);*/
if (recalc)
return;
op = n->Eoper;
if (op == OPcolon || op == OPcolon2)
{
Expand Down Expand Up @@ -1098,15 +1096,7 @@ STATIC void cpwalk(register elem *n,vec_t IN)
n->ET = nt;

changes++;

// Mark ones we can no longer use
foreach(i,exptop,IN)
{
if (f == expnod[i]->E2->EV.sp.Vsym)
{ recalc++;
break;
}
}
recalc++;
}
//else dbg_printf("not found\n");
noprop:
Expand Down
126 changes: 126 additions & 0 deletions test/compilable/test13193.d
@@ -0,0 +1,126 @@
// REQUIRED_ARGS: -O -inline -c


final class SharedLib {
void getSymbol() {return getSymbolImpl();}
void getSymbolImpl() {return getSymbol_();}
/* add more intermediate functions to go slower */
void getSymbol_() {}
}


void test13193()
{
SharedLib ssllib;
void bindFunc() {ssllib.getSymbol();}
bindFunc(); /* add more of these to go slower */
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 10 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 20 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 30 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 40 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 50 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 60 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 70 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 80 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 90 */

bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc();
bindFunc(); /* 100 */
}

0 comments on commit 0ee4cb4

Please sign in to comment.