Bug 118750

Summary: fourthTier: NaturalLoops should be able to quickly answer questions like "what loops own this basic block"
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: barraclough, ggaren, mark.lam, mhahnenberg, msaboff, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 118749    
Attachments:
Description Flags
the patch
none
the patch mhahnenberg: review+

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