-
fpizlo@apple.com authored
https://bugs.webkit.org/show_bug.cgi?id=85269 Source/JavaScriptCore: Reviewed by Oliver Hunt. Merged r115754 from dfgopt. Implements a naive dominator calculator, which is currently just used to print information in graph dumps. I've enabled it by default mainly to be able to track its performance impact. So far it appears that there is none, which is unsurprising given that the number of basic blocks in most procedures is small. Also tweaked bytecode dumping to reveal more useful information about the nature of the code block. * CMakeLists.txt: * GNUmakefile.list.am: * JavaScriptCore.xcodeproj/project.pbxproj: * Target.pri: * bytecode/CodeBlock.cpp: (JSC::CodeBlock::dump): * dfg/DFGDominators.cpp: Added. (DFG): (JSC::DFG::Dominators::Dominators): (JSC::DFG::Dominators::~Dominators): (JSC::DFG::Dominators::compute): (JSC::DFG::Dominators::iterateForBlock): * dfg/DFGDominators.h: Added. (DFG): (Dominators): (JSC::DFG::Dominators::invalidate): (JSC::DFG::Dominators::computeIfNecessary): (JSC::DFG::Dominators::isValid): (JSC::DFG::Dominators::dominates): * dfg/DFGDriver.cpp: (JSC::DFG::compile): * dfg/DFGGraph.cpp: (JSC::DFG::Graph::dump): * dfg/DFGGraph.h: (Graph): Source/WTF: Reviewed by Oliver Hunt. Merged r115754 from dfgopt. Added a bitvector class suitable for cheap static analysis. This class differs from BitVector in that instead of optimizing for space, it optimizes for execution time. Its API is also somewhat less friendly, which is intentional; it's meant to be used in places where you know up front how bit your bitvectors are going to be. * GNUmakefile.list.am: * WTF.vcproj/WTF.vcproj: * WTF.xcodeproj/project.pbxproj: * wtf/FastBitVector.h: Added. (WTF): (FastBitVector): (WTF::FastBitVector::FastBitVector): (WTF::FastBitVector::operator=): (WTF::FastBitVector::numBits): (WTF::FastBitVector::resize): (WTF::FastBitVector::setAll): (WTF::FastBitVector::clearAll): (WTF::FastBitVector::set): (WTF::FastBitVector::setAndCheck): (WTF::FastBitVector::equals): (WTF::FastBitVector::merge): (WTF::FastBitVector::filter): (WTF::FastBitVector::exclude): (WTF::FastBitVector::clear): (WTF::FastBitVector::get): (WTF::FastBitVector::arrayLength): git-svn-id: http://svn.webkit.org/repository/webkit/trunk@117861 268f45cc-cd09-0410-ab3c-d52691b4dbfc
ba79d1f9