Bug 172508 - CFGSimplificationPhase should not merge a block with itself
Summary: CFGSimplificationPhase should not merge a block with itself
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Saam Barati
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2017-05-23 10:29 PDT by Saam Barati
Modified: 2017-05-23 11:49 PDT (History)
12 users (show)

See Also:


Attachments
patch (6.37 KB, patch)
2017-05-23 11:06 PDT, Saam Barati
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Saam Barati 2017-05-23 10:29:07 PDT
except it tries to, and will have a very bad time. Test:
```
function bar() {}
noInline(bar);

function baz() { }

function foo() {
    if (typeof baz !== "undefined") {
    } else {
        while (true) bar();
    }
}
noInline(foo);
for (let i = 0; i < 10000; ++i)
    foo();
```
Comment 1 Saam Barati 2017-05-23 10:29:47 PDT
<rdar://problem/28424006>
Comment 2 Radar WebKit Bug Importer 2017-05-23 10:53:58 PDT
<rdar://problem/32355021>
Comment 3 Saam Barati 2017-05-23 11:06:58 PDT
Created attachment 311026 [details]
patch
Comment 4 Keith Miller 2017-05-23 11:09:23 PDT
Comment on attachment 311026 [details]
patch

r=me.
Comment 5 WebKit Commit Bot 2017-05-23 11:49:19 PDT
Comment on attachment 311026 [details]
patch

Clearing flags on attachment: 311026

Committed r217287: <http://trac.webkit.org/changeset/217287>
Comment 6 WebKit Commit Bot 2017-05-23 11:49:20 PDT
All reviewed patches have been landed.  Closing bug.