October 15
https://issues.dlang.org/show_bug.cgi?id=24816

          Issue ID: 24816
           Summary: backend optimizer slowdown on large for loop body
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Keywords: industry
          Severity: minor
          Priority: P1
         Component: dmd
          Assignee: nobody@puremagic.com
          Reporter: dkorpel@live.nl
            Blocks: 21121

Change the size of the static foreach to arbitrarily explode compilation time when compiling with -O:

```
void f()
{
    for (int i = 0; i < 1; i++)
    {
        int j = 0;
        static foreach (k; 0 .. 1000)
            j++;
    }
}
```

The optimizer should stop trying to do quadratic time loop optimizations past a certain threshold.


Referenced Issues:

https://issues.dlang.org/show_bug.cgi?id=21121
[Issue 21121] Optimizer slowdowns
--