[Webkit-unassigned] [Bug 151141] New: Implement table-based switches in B3/Air

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Nov 11 10:57:43 PST 2015


https://bugs.webkit.org/show_bug.cgi?id=151141

            Bug ID: 151141
           Summary: Implement table-based switches in B3/Air
    Classification: Unclassified
           Product: WebKit
           Version: WebKit Nightly Build
          Hardware: All
                OS: All
            Status: NEW
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
          Assignee: webkit-unassigned at lists.webkit.org
          Reporter: fpizlo at apple.com

We should do this in B3::lowerMacros(). During the recursive bisecting, if we find a span of case statements that is sufficiently compact, we can optimize it down to an indirect jump.  This can be represented in B3.

- The jump table can be an opaque byproduct that will eventually hold and array of CodeLocationLabels.
- Introduce a new B3 Opcode called AwesomeJump that takes a pointer to jump to and a list of BasicBlocks that are possible successors.
- AwesomeJumps can be compiled to something equivalent in Air.
- CFG simplification ignores AwesomeJumps except when they only have one successor, in which case it can turn them into a Jump.
- A late phase can tell the byproduct holding the jump table that now is a good time to get the addresses of the BasicBlocks.  This will need some kind of hook into Air::generate().

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.webkit.org/pipermail/webkit-unassigned/attachments/20151111/b3a529cc/attachment.html>


More information about the webkit-unassigned mailing list