Bug 118750 - fourthTier: NaturalLoops should be able to quickly answer questions like "what loops own this basic block"
Summary: fourthTier: NaturalLoops should be able to quickly answer questions like "wha...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Filip Pizlo
URL:
Keywords:
Depends on:
Blocks: 118749
  Show dependency treegraph
 
Reported: 2013-07-16 14:52 PDT by Filip Pizlo
Modified: 2013-07-16 15:49 PDT (History)
7 users (show)

See Also:


Attachments
the patch (8.69 KB, patch)
2013-07-16 15:11 PDT, Filip Pizlo
no flags Details | Formatted Diff | Diff
the patch (10.51 KB, patch)
2013-07-16 15:36 PDT, Filip Pizlo
mhahnenberg: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Filip Pizlo 2013-07-16 14:52:19 PDT
Patch forthcoming.
Comment 1 Filip Pizlo 2013-07-16 15:11:55 PDT
Created attachment 206817 [details]
the patch
Comment 2 Filip Pizlo 2013-07-16 15:36:12 PDT
Created attachment 206819 [details]
the patch
Comment 3 Mark Hahnenberg 2013-07-16 15:47:58 PDT
Comment on attachment 206819 [details]
the patch

View in context: https://bugs.webkit.org/attachment.cgi?id=206819&action=review

r=me with comments.

> Source/JavaScriptCore/dfg/DFGNaturalLoops.cpp:190
> +            ASSERT(simpleLoopsOf == fancyLoopsOf);

RELEASE_ASSERT

> Source/JavaScriptCore/dfg/DFGNaturalLoops.h:116
> +        for (
> +            const NaturalLoop* loop = innerMostLoopOf(block);
> +            loop;
> +            loop = innerMostOuterLoop(*loop)) {
> +            if (loop->header() == block)
> +                return loop;

Don't need to for-loop. Modified version looks good.

> Source/JavaScriptCore/dfg/DFGPlan.cpp:192
> +    // to self-validate. Now is as good a time as any, to do this.

No comma :-)
Comment 4 Filip Pizlo 2013-07-16 15:49:46 PDT
Landed in http://trac.webkit.org/changeset/152745