diff options
| author | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
|---|---|---|
| committer | Lorry Tar Creator <lorry-tar-importer@lorry> | 2015-05-20 09:56:07 +0000 |
| commit | 41386e9cb918eed93b3f13648cbef387e371e451 (patch) | |
| tree | a97f9d7bd1d9d091833286085f72da9d83fd0606 /Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp | |
| parent | e15dd966d523731101f70ccf768bba12435a0208 (diff) | |
| download | WebKitGtk-tarball-41386e9cb918eed93b3f13648cbef387e371e451.tar.gz | |
webkitgtk-2.4.9webkitgtk-2.4.9
Diffstat (limited to 'Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp')
| -rw-r--r-- | Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp | 23 |
1 files changed, 5 insertions, 18 deletions
diff --git a/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp b/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp index 340ef2d18..507e00ff5 100644 --- a/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp +++ b/Source/JavaScriptCore/dfg/DFGLoopPreHeaderCreationPhase.cpp @@ -32,17 +32,16 @@ #include "DFGBlockInsertionSet.h" #include "DFGGraph.h" #include "DFGPhase.h" -#include "JSCInlines.h" +#include "Operations.h" #include <wtf/HashMap.h> namespace JSC { namespace DFG { BasicBlock* createPreHeader(Graph& graph, BlockInsertionSet& insertionSet, BasicBlock* block) { - // Don't bother to preserve execution frequencies for now. - BasicBlock* preHeader = insertionSet.insertBefore(block, PNaN); + BasicBlock* preHeader = insertionSet.insertBefore(block); preHeader->appendNode( - graph, SpecNone, Jump, block->firstOrigin(), OpInfo(block)); + graph, SpecNone, Jump, block->at(0)->codeOrigin, OpInfo(block)); for (unsigned predecessorIndex = 0; predecessorIndex < block->predecessors.size(); predecessorIndex++) { BasicBlock* predecessor = block->predecessors[predecessorIndex]; @@ -88,23 +87,11 @@ public: existingPreHeader = predecessor; continue; } - // We won't have duplicate entries in the predecessors list. - DFG_ASSERT(m_graph, nullptr, existingPreHeader != predecessor); + if (existingPreHeader == predecessor) + continue; needsNewPreHeader = true; break; } - - // This phase should only be run on a DFG where unreachable blocks have been pruned. - // We also don't allow loops back to root. This means that every loop header has got - // to have a pre-header. - DFG_ASSERT(m_graph, nullptr, existingPreHeader); - - // We are looking at the predecessors of a loop header. A loop header has to have - // some predecessor other than the pre-header. We must have broken critical edges - // because that is the DFG SSA convention. Therefore, each predecessor of the loop - // header must have only one successor. - DFG_ASSERT(m_graph, nullptr, existingPreHeader->terminal()->op() == Jump); - if (!needsNewPreHeader) continue; |
