Bug 130791

Summary: FTL should use stackmap register liveness
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Filip Pizlo <fpizlo>
Status: RESOLVED FIXED    
Severity: Normal CC: atrick, barraclough, ggaren, juergen, mark.lam, mhahnenberg, msaboff, nrotem, oliver, sam
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on: 130792, 130801, 130821, 130924, 130948    
Bug Blocks: 112840, 130885    
Attachments:
Description Flags
work in progress
none
more
none
the patch ggaren: review+

Description Filip Pizlo 2014-03-26 12:36:05 PDT
Patch forthcoming.
Comment 1 Andrew Trick 2014-03-27 10:30:11 PDT
The LLVM side of this is untested. We need a runtime mode that clobbers the dead regs. Ideally we could also have a mode to disable inline caches (cause them to fail) to test as many patchpoint liveouts as possible.
Comment 2 Filip Pizlo 2014-03-27 11:24:18 PDT
(In reply to comment #1)
> The LLVM side of this is untested. We need a runtime mode that clobbers the dead regs. Ideally we could also have a mode to disable inline caches (cause them to fail) to test as many patchpoint liveouts as possible.

That's a great idea and it should be easy to add such a mode. I'll investigate adding it as part of the patch that glues all of this together. Hopefully doing so won't slow the usual test cycle down too much. I wonder if we could also strengthen this by making the C++ code clobber all registers, ideally with a runtime switch, and even better if it doesn't involve too many hard-to-maintain hacks.
Comment 3 Andrew Trick 2014-03-27 14:51:56 PDT
Regarding LLVM-based clobbering, see http://llvm.org/pr19267.
Comment 4 Filip Pizlo 2014-03-27 21:03:21 PDT
Created attachment 228021 [details]
work in progress

This doesn't work yet.
Comment 5 Filip Pizlo 2014-03-27 21:08:44 PDT
(In reply to comment #4)
> Created an attachment (id=228021) [details]
> work in progress
> 
> This doesn't work yet.

deltablue is super unhappy, I will investigate why.
Comment 6 Filip Pizlo 2014-03-27 22:00:26 PDT
(In reply to comment #5)
> (In reply to comment #4)
> > Created an attachment (id=228021) [details] [details]
> > work in progress
> > 
> > This doesn't work yet.
> 
> deltablue is super unhappy, I will investigate why.

Heh, it's less likely to fail in a debug build.  Because of course the C++ code will use fewer registers in debug mode. ;-)
Comment 7 Filip Pizlo 2014-03-28 14:36:15 PDT
Created attachment 228084 [details]
more
Comment 8 Filip Pizlo 2014-04-12 11:29:46 PDT
Created attachment 229207 [details]
the patch
Comment 9 Geoffrey Garen 2014-04-12 11:33:35 PDT
Comment on attachment 229207 [details]
the patch

r=me
Comment 10 Filip Pizlo 2014-04-12 13:42:19 PDT
Landed in http://trac.webkit.org/changeset/167187