[Webkit-unassigned] [Bug 144500] New: FTL should use AI more

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri May 1 14:25:07 PDT 2015


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

            Bug ID: 144500
           Summary: FTL should use AI more
    Classification: Unclassified
           Product: WebKit
           Version: 528+ (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

Currently if a DFG Node semantically requires a check, and we know that the check is redundant, then one of three things happen in the FTL backend:

1) If the check is part of the edge, then we will correctly remove it and not emit any LLVM IR for the check.

2) If the check is the only thing that the node does, and AI knows this, then ConstantFoldingPhase will remove the node before we get to the backend.

3) If the node does many things and also the check (or AI just doesn't know about the check), then we will emit LLVM IR for the check.  In many (most?) cases, LLVM will not remove the check because it will involve things opaque to LLVM - like loading the type part of the object's header.

An easy simplification is to have all of the isNumber/isCell/isBlah things in FTL::LowerDFGToLLVM have a mode where they return an LLVM constant if we have already proved that the incoming value either is, or isn't, the type in question.  This will be slightly less effective than (1) or (2) since we will still emit control flow for the unreachable path, but in the end LLVM will prove this control flow unreachable and kill the code - so it's much better than falling over to (3).

-- 
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/20150501/673756bd/attachment.html>


More information about the webkit-unassigned mailing list