Ignore:
Timestamp:
May 10, 2018, 3:23:12 PM (7 years ago)
Author:
[email protected]
Message:

DFG CFA should pick the right time to inject OSR entry data
https://bugs.webkit.org/show_bug.cgi?id=185530

Reviewed by Saam Barati.

Previously, we would do a bonus run of CFA to inject OSR entry data. This patch makes us inject
OSR entry data as part of the normal flow of CFA, which reduces the total number of CFA
reexecutions while minimizing the likelihood that we have CFA execute constants in paths that
would eventually LUB to non-constant.

This looks like almost a 1% speed-up on SunSpider-CompileTime. All of the logic for preventing
execution over constants is for V8Spider-CompileTime/regexp, which would otherwise do a lot of
useless regexp/string execution in the compiler.

  • dfg/DFGBlockSet.h:

(JSC::DFG::BlockSet::remove):

  • dfg/DFGCFAPhase.cpp:

(JSC::DFG::CFAPhase::run):
(JSC::DFG::CFAPhase::injectOSR):
(JSC::DFG::CFAPhase::performBlockCFA):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGBlockSet.h

    r206525 r231665  
    11/*
    2  * Copyright (C) 2014 Apple Inc. All rights reserved.
     2 * Copyright (C) 2014-2018 Apple Inc. All rights reserved.
    33 *
    44 * Redistribution and use in source and binary forms, with or without
     
    4343    {
    4444        return !m_set.set(block->index);
     45    }
     46   
     47    // Return true if the block was removed, false if it was already absent.
     48    bool remove(BasicBlock* block)
     49    {
     50        return m_set.clear(block->index);
    4551    }
    4652   
Note: See TracChangeset for help on using the changeset viewer.