Bug 68763

Summary: DFG JIT should not eagerly initialize integer tags in the register file
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Severity: Normal CC: fpizlo, oliver
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Bug Depends on:    
Bug Blocks: 68593, 68677    
Description Flags
the patch oliver: review+

Description Filip Pizlo 2011-09-24 13:39:44 PDT
Eagerly initializing integer tags has three outcomes:

1) We incur the cost of doing so even though neither the DFG nor the GC ever use integer tags for variables that are predicted integer.

2) It complicates the implementation of live range splitting.  Eager initialization of integer tags assumes that the variable will be an integer for the entire span of the function, but work is underway to enable a variable to have different predictions in different intervals (https://bugs.webkit.org/show_bug.cgi?id=68593).

3) It introduces an annoying bug: if we OSR entry does not initialize integer tags, so if we do OSR entry and then OSR exit, the old JIT may see integers that have not had their tags initialized.

The solution is to have the DFG initialize integer tags only on OSR exit, as that is the only point at which they need to be initialized.
Comment 1 Filip Pizlo 2011-09-24 13:42:15 PDT
Created attachment 108587 [details]
the patch
Comment 2 Filip Pizlo 2011-09-24 13:46:00 PDT
This bug mainly manifests itself as we increase the number of OSR's by implementing https://bugs.webkit.org/show_bug.cgi?id=68677
Comment 3 Filip Pizlo 2011-09-24 14:24:14 PDT
Landed in r95910.