[Webkit-unassigned] [Bug 151350] New: It's best for the DFG to always have some guess of basic block frequency

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Nov 17 10:31:52 PST 2015


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

            Bug ID: 151350
           Summary: It's best for the DFG to always have some guess of
                    basic block frequency
    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

Previously we used PNaN whenever we weren't sure about the execution frequency. This was partly to ensure that the execution frequencies "made sense".  I think that this is the wrong approach, and it's definitely not profitable when you consider how B3 will use the frequencies.  We should define frequency by what effects it has on optimization and correctness.  I propose:

- Frequency has no effect on correctness.  It should be OK to pass any bag of double bits, including NaN, as the frequency.  Using NaN could cause the compiler to make silly and unprofitable decisions, but it shouldn't break anything.

- Frequency should be used for register allocation and layout.  Higher frequency means that we want to prioritize that basic block.  Some optimizations that frequency will affect:

    Register allocation: temporaries used in a block with higher frequency will get higher priority.

    Layout: when a block branches to multiple blocks, the block with highest frequency is likely to be scheduled closest, so that in the best case it will be the fall-through block.

-- 
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/20151117/e127384b/attachment.html>


More information about the webkit-unassigned mailing list