Bug 113623

Summary: fourthTier: FTL should have OSR exit
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 Keywords: InRadar
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 113819, 113894, 113897, 113905, 114073, 114300, 114306, 114542    
Bug Blocks: 112840    
Attachments:
Description Flags
work in progress
none
more
none
more
none
more
none
more
none
rebased
none
more
none
more
none
more
none
it might be done
none
lol it compiles
none
the patch
oliver: review+
it runs all benchmarks oliver: review+

Description Filip Pizlo 2013-03-29 16:14:54 PDT
This will be soooooper fun.
Comment 1 Filip Pizlo 2013-03-31 18:44:25 PDT
<rdar://problem/13543692>
Comment 2 Filip Pizlo 2013-04-04 13:03:12 PDT
Created attachment 196508 [details]
work in progress
Comment 3 Filip Pizlo 2013-04-04 15:17:01 PDT
Created attachment 196539 [details]
more
Comment 4 Filip Pizlo 2013-04-04 17:37:42 PDT
Created attachment 196562 [details]
more
Comment 5 Filip Pizlo 2013-04-04 18:46:15 PDT
Created attachment 196565 [details]
more

It's getting pretty close.  But still lots more work to do.
Comment 6 Filip Pizlo 2013-04-05 16:47:51 PDT
Created attachment 196700 [details]
more
Comment 7 Filip Pizlo 2013-04-05 17:11:32 PDT
Created attachment 196704 [details]
rebased
Comment 8 Filip Pizlo 2013-04-09 13:48:53 PDT
Created attachment 197166 [details]
more
Comment 9 Filip Pizlo 2013-04-10 00:16:18 PDT
Created attachment 197216 [details]
more
Comment 10 Filip Pizlo 2013-04-10 12:29:22 PDT
Created attachment 197373 [details]
more
Comment 11 Filip Pizlo 2013-04-10 21:10:41 PDT
Created attachment 197502 [details]
it might be done

I still need to compile it and stuff.
Comment 12 Filip Pizlo 2013-04-11 18:18:49 PDT
Created attachment 197706 [details]
lol it compiles

I compiled the LLVM backend with LLVM and LLVM was happy.

Still haven't tested it, though.
Comment 13 Filip Pizlo 2013-04-12 17:35:00 PDT
Created attachment 197914 [details]
the patch
Comment 14 Oliver Hunt 2013-04-12 19:02:25 PDT
Comment on attachment 197914 [details]
the patch

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

> Source/JavaScriptCore/ftl/FTLExitThunkGenerator.cpp:53
> +    move(TrustedImm32(index), GPRInfo::nonArgGPR0);

I am dubious as to how trusted this is, but until i have evidence that we can be coerced into planting a large number of these in succession i'll give it a pass.
Comment 15 Filip Pizlo 2013-04-12 23:33:57 PDT
Created attachment 197920 [details]
it runs all benchmarks

The only things I changed from the previous patch:

1) Fixed some calling convention goofs.

2) Made reoptimization work for FTL, which mostly required removing some incorrect assertions in CodeBlock.

3) Fixed CheckStructure, since it was generating wrong IR.

4) Added the FTL_NEW_BLOCK macro and started using it everywhere, it makes IR more readable when --verboseCompilation=true.

We can now run all of SunSpider, V8, and Kraken with the FTL enabled. :-)
Comment 16 Filip Pizlo 2013-04-13 00:36:56 PDT
Landed in http://trac.webkit.org/changeset/148347