haikuwebkit/Source/WTF/wtf/Liveness.h

377 lines
13 KiB
C
Raw Permalink Normal View History

B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
/*
* Copyright (C) 2015-2017 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
*
* THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
* EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
* PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
* CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
* EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
* PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
* PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#pragma once
#include <wtf/BitVector.h>
#include <wtf/IndexSparseSet.h>
#include <wtf/StdLibExtras.h>
namespace WTF {
// HEADS UP: The algorithm here is duplicated in AirRegLiveness.h. That one uses sets rather
// than fancy vectors, because that's better for register liveness analysis.
template<typename Adapter>
class Liveness : public Adapter {
public:
typedef typename Adapter::CFG CFG;
typedef typename Adapter::Thing Thing;
typedef Vector<unsigned, 4, UnsafeVectorOverflow> IndexVector;
B3::fixSSA() needs a tune-up https://bugs.webkit.org/show_bug.cgi?id=170485 Reviewed by Saam Barati. Source/JavaScriptCore: After the various optimizations to liveness, register allocation, and other phases, the fixSSA() phase now looks like one of the top offenders. This includes a bunch of changes to make this phase run faster. This is a ~7% wasm -O1 compile time progression. Here's what I did: - We now use IndexSparseSet instead of IndexMap for tracking variable values. This makes it cheaper to chew through small blocks while there is a non-trivial number of total variables. - We now do a "local SSA conversion" pass before anything else. This eliminates obvious Get's. If we were using temporary Variables, it would eliminate many of those. That's useful for when we use demoteValues() and duplciateTails(). For wasm -O1, we mainly care about the fact that it makes a bunch of Set's dead. - We now do a Set DCE pass after the local SSA but before SSA conversion. This ensures that any block-local live intervals of Variables disappear and don't need further consideration. - We now cache the reaching defs calculation. - We now perform the reaching defs calculation lazily. * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): (JSC::B3::fixSSA): * b3/B3SSACalculator.cpp: (JSC::B3::SSACalculator::reachingDefAtTail): * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * dfg/DFGLivenessAnalysisPhase.cpp: (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): Deleted. (JSC::DFG::LivenessAnalysisPhase::run): Deleted. (JSC::DFG::LivenessAnalysisPhase::processBlock): Deleted. Source/WTF: This makes IndexSparseSet capable of being used as a map if you instantiate it with KeyValuePair<unsigned, ValueType>. * wtf/HashTraits.h: * wtf/IndexSparseSet.h: (WTF::DefaultIndexSparseSetTraits::create): (WTF::DefaultIndexSparseSetTraits::key): (WTF::OverflowHandler>::IndexSparseSet): (WTF::OverflowHandler>::add): (WTF::OverflowHandler>::set): (WTF::OverflowHandler>::remove): (WTF::OverflowHandler>::clear): (WTF::OverflowHandler>::size): (WTF::OverflowHandler>::isEmpty): (WTF::OverflowHandler>::contains): (WTF::OverflowHandler>::sort): (WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet): Deleted. (WTF::IndexSparseSet<OverflowHandler>::add): Deleted. (WTF::IndexSparseSet<OverflowHandler>::remove): Deleted. (WTF::IndexSparseSet<OverflowHandler>::clear): Deleted. (WTF::IndexSparseSet<OverflowHandler>::size): Deleted. (WTF::IndexSparseSet<OverflowHandler>::isEmpty): Deleted. (WTF::IndexSparseSet<OverflowHandler>::contains): Deleted. (WTF::IndexSparseSet<OverflowHandler>::sort): Deleted. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::workset): Canonical link: https://commits.webkit.org/187401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-05 00:25:02 +00:00
typedef IndexSparseSet<unsigned, DefaultIndexSparseSetTraits<unsigned>, UnsafeVectorOverflow> Workset;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
template<typename... Arguments>
Liveness(CFG& cfg, Arguments&&... arguments)
: Adapter(std::forward<Arguments>(arguments)...)
, m_cfg(cfg)
, m_workset(Adapter::numIndices())
, m_liveAtHead(cfg.template newMap<IndexVector>())
, m_liveAtTail(cfg.template newMap<IndexVector>())
{
}
Don't need to Air::reportUsedRegisters for wasm at -O1 https://bugs.webkit.org/show_bug.cgi?id=170459 Reviewed by Saam Barati. Source/JavaScriptCore: I did some refactorings to Liveness<> to try to understand its performance. Based on this I concluded that the bigger immediate issue is just removing unnecessary phases from -O1. This removes Air::reportUsedRegisters() from -O1 if the user has indicated that he is not interested in StackmapGenerationParams::usedRegisters(). The logic here is a bit weird because of how Air does spill code generation. The register allocator's spiller will emit spill code using identifiable spill slots, which allows subsequent phases to register-allocate the spill slots. We do this by a forward flow CSE phase called fixObviousSpills (which is a terrible name since there is no longer anything obvious about some of the spills that this phase can fix!). As is most natural for CSEs over 3AC, it rewires the uses of redundant computations rather than removing the redundant computations. This means that if a spill got "fixed", there may be either or both of the following: - Dead loads from the stack. - Dead stores to the stack. We know that a load from the stack is dead if the register is dead at the point of the load. We know that a store to the stack is dead if the spill slot is dead at the point of the store. Unfortunately, liveness analysis - over either registers or spill slots - is expensive. Fortunately, allocateStack() already does liveness analysis over spill slots. So, we baked elimination of stores to the stack into that phase. That aspect of clean-up after the spill CSE comes for free. Also fortunately for the FTL, we have to do reportUsedRegisters() anyway. This is a phase that enables StackmapGenerationParams::usedRegisters() to work, which then enables the FTL's patchpoints to do crazy slow-path live range splitting. So, Air's strategy for the load fix-up after spill CSE is to do it as part of reportUsedRegisters(). This patch introduces the Procedure::setNeedsUsedRegisters() API. But if you set needsUsedRegisters to false then we will still run reportUsedRegisters() at -O2 as an optimization - it removes dead loads from the stack that are left behind from fixObviousSpills(). This is a ~6% compile time progression at -O1. * b3/B3Procedure.h: (JSC::B3::Procedure::setNeedsUsedRegisters): (JSC::B3::Procedure::needsUsedRegisters): * b3/B3StackmapGenerationParams.h: * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::needsUsedRegisters): * b3/air/AirCode.h: * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): Source/WTF: Just moved the liveness computation into a method, which enabled me to do the profiling that I used to write this patch. * wtf/Liveness.h: (WTF::Liveness::Liveness): (WTF::Liveness::compute): Canonical link: https://commits.webkit.org/187373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-04 19:09:03 +00:00
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
// This calculator has to be run in reverse.
class LocalCalc {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
public:
LocalCalc(Liveness& liveness, typename CFG::Node block)
: m_liveness(liveness)
, m_block(block)
{
auto& workset = liveness.m_workset;
workset.clear();
IndexVector& liveAtTail = liveness.m_liveAtTail[block];
for (unsigned index : liveAtTail)
workset.add(index);
}
class Iterable {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
public:
Iterable(Liveness& liveness)
: m_liveness(liveness)
{
}
class iterator {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
public:
B3::fixSSA() needs a tune-up https://bugs.webkit.org/show_bug.cgi?id=170485 Reviewed by Saam Barati. Source/JavaScriptCore: After the various optimizations to liveness, register allocation, and other phases, the fixSSA() phase now looks like one of the top offenders. This includes a bunch of changes to make this phase run faster. This is a ~7% wasm -O1 compile time progression. Here's what I did: - We now use IndexSparseSet instead of IndexMap for tracking variable values. This makes it cheaper to chew through small blocks while there is a non-trivial number of total variables. - We now do a "local SSA conversion" pass before anything else. This eliminates obvious Get's. If we were using temporary Variables, it would eliminate many of those. That's useful for when we use demoteValues() and duplciateTails(). For wasm -O1, we mainly care about the fact that it makes a bunch of Set's dead. - We now do a Set DCE pass after the local SSA but before SSA conversion. This ensures that any block-local live intervals of Variables disappear and don't need further consideration. - We now cache the reaching defs calculation. - We now perform the reaching defs calculation lazily. * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): (JSC::B3::fixSSA): * b3/B3SSACalculator.cpp: (JSC::B3::SSACalculator::reachingDefAtTail): * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * dfg/DFGLivenessAnalysisPhase.cpp: (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): Deleted. (JSC::DFG::LivenessAnalysisPhase::run): Deleted. (JSC::DFG::LivenessAnalysisPhase::processBlock): Deleted. Source/WTF: This makes IndexSparseSet capable of being used as a map if you instantiate it with KeyValuePair<unsigned, ValueType>. * wtf/HashTraits.h: * wtf/IndexSparseSet.h: (WTF::DefaultIndexSparseSetTraits::create): (WTF::DefaultIndexSparseSetTraits::key): (WTF::OverflowHandler>::IndexSparseSet): (WTF::OverflowHandler>::add): (WTF::OverflowHandler>::set): (WTF::OverflowHandler>::remove): (WTF::OverflowHandler>::clear): (WTF::OverflowHandler>::size): (WTF::OverflowHandler>::isEmpty): (WTF::OverflowHandler>::contains): (WTF::OverflowHandler>::sort): (WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet): Deleted. (WTF::IndexSparseSet<OverflowHandler>::add): Deleted. (WTF::IndexSparseSet<OverflowHandler>::remove): Deleted. (WTF::IndexSparseSet<OverflowHandler>::clear): Deleted. (WTF::IndexSparseSet<OverflowHandler>::size): Deleted. (WTF::IndexSparseSet<OverflowHandler>::isEmpty): Deleted. (WTF::IndexSparseSet<OverflowHandler>::contains): Deleted. (WTF::IndexSparseSet<OverflowHandler>::sort): Deleted. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::workset): Canonical link: https://commits.webkit.org/187401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-05 00:25:02 +00:00
iterator(Adapter& adapter, Workset::const_iterator sparceSetIterator)
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
: m_adapter(adapter)
, m_sparceSetIterator(sparceSetIterator)
{
}
iterator& operator++()
{
++m_sparceSetIterator;
return *this;
}
typename Adapter::Thing operator*() const
{
return m_adapter.indexToValue(*m_sparceSetIterator);
}
bool operator==(const iterator& other) { return m_sparceSetIterator == other.m_sparceSetIterator; }
bool operator!=(const iterator& other) { return m_sparceSetIterator != other.m_sparceSetIterator; }
private:
Adapter& m_adapter;
B3::fixSSA() needs a tune-up https://bugs.webkit.org/show_bug.cgi?id=170485 Reviewed by Saam Barati. Source/JavaScriptCore: After the various optimizations to liveness, register allocation, and other phases, the fixSSA() phase now looks like one of the top offenders. This includes a bunch of changes to make this phase run faster. This is a ~7% wasm -O1 compile time progression. Here's what I did: - We now use IndexSparseSet instead of IndexMap for tracking variable values. This makes it cheaper to chew through small blocks while there is a non-trivial number of total variables. - We now do a "local SSA conversion" pass before anything else. This eliminates obvious Get's. If we were using temporary Variables, it would eliminate many of those. That's useful for when we use demoteValues() and duplciateTails(). For wasm -O1, we mainly care about the fact that it makes a bunch of Set's dead. - We now do a Set DCE pass after the local SSA but before SSA conversion. This ensures that any block-local live intervals of Variables disappear and don't need further consideration. - We now cache the reaching defs calculation. - We now perform the reaching defs calculation lazily. * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): (JSC::B3::fixSSA): * b3/B3SSACalculator.cpp: (JSC::B3::SSACalculator::reachingDefAtTail): * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * dfg/DFGLivenessAnalysisPhase.cpp: (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): Deleted. (JSC::DFG::LivenessAnalysisPhase::run): Deleted. (JSC::DFG::LivenessAnalysisPhase::processBlock): Deleted. Source/WTF: This makes IndexSparseSet capable of being used as a map if you instantiate it with KeyValuePair<unsigned, ValueType>. * wtf/HashTraits.h: * wtf/IndexSparseSet.h: (WTF::DefaultIndexSparseSetTraits::create): (WTF::DefaultIndexSparseSetTraits::key): (WTF::OverflowHandler>::IndexSparseSet): (WTF::OverflowHandler>::add): (WTF::OverflowHandler>::set): (WTF::OverflowHandler>::remove): (WTF::OverflowHandler>::clear): (WTF::OverflowHandler>::size): (WTF::OverflowHandler>::isEmpty): (WTF::OverflowHandler>::contains): (WTF::OverflowHandler>::sort): (WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet): Deleted. (WTF::IndexSparseSet<OverflowHandler>::add): Deleted. (WTF::IndexSparseSet<OverflowHandler>::remove): Deleted. (WTF::IndexSparseSet<OverflowHandler>::clear): Deleted. (WTF::IndexSparseSet<OverflowHandler>::size): Deleted. (WTF::IndexSparseSet<OverflowHandler>::isEmpty): Deleted. (WTF::IndexSparseSet<OverflowHandler>::contains): Deleted. (WTF::IndexSparseSet<OverflowHandler>::sort): Deleted. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::workset): Canonical link: https://commits.webkit.org/187401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-05 00:25:02 +00:00
Workset::const_iterator m_sparceSetIterator;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
};
iterator begin() const { return iterator(m_liveness, m_liveness.m_workset.begin()); }
iterator end() const { return iterator(m_liveness, m_liveness.m_workset.end()); }
bool contains(const typename Adapter::Thing& thing) const
{
Linear scan should run liveness only once https://bugs.webkit.org/show_bug.cgi?id=170569 Reviewed by Keith Miller. Source/JavaScriptCore: Air has a longstanding design bug that Tmps from different banks are indexed independently. This means that all of our analyses over Tmps do separate GP and FP passes. This does have some marginal benefits (the rest of the algorithm is specialized for Bank) but it's probably net bad. However, I don't want to think about solving that general problem. Instead, this just makes linear scan use a UnifiedTmpLiveness that uses a single "linear" indexing for GP and FP. This lets me avoid the much larger refactoring (which would involve substantial changes in graph coloring) while getting the bulk of the benefit (liveness runs once, instead of twice, for linear scan). This patch implements a lot of plumbing to make it possible for Liveness<> to view Tmps as having a unified indexing scheme. Tmp calls this LinearlyIndexed (to match the naming convention of AbsolutelyIndexed and Indexed), while AirLiveness calls this UnifiedTmpLiveness. With this change, -O1 never does any liveness analysis that uses separate GP and FP passes. I think this eliminates any urgency from the larger Tmp indexing bug. We can probably live with graph coloring doing separate passes. This is a ~6% speed-up for wasm -O1 compile times. I think this means that linear scan is no longer the longest pole in the tent. * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3VariableLiveness.h: (JSC::B3::VariableLivenessAdapter::prepareToCompute): * b3/air/AirAllocateRegistersByLinearScan.cpp: (JSC::B3::Air::allocateRegistersByLinearScan): * b3/air/AirCode.h: (JSC::B3::Air::Code::forEachTmp): * b3/air/AirLiveness.h: * b3/air/AirLivenessAdapter.h: (JSC::B3::Air::LivenessAdapter::Actions::Actions): (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::adapter): (JSC::B3::Air::LivenessAdapter::prepareToCompute): (JSC::B3::Air::LivenessAdapter::actionsAt): (JSC::B3::Air::LivenessAdapter::forEachUse): (JSC::B3::Air::LivenessAdapter::forEachDef): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::UnifiedTmpLivenessAdapter::UnifiedTmpLivenessAdapter): (JSC::B3::Air::UnifiedTmpLivenessAdapter::numIndices): (JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsBank): (JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsRole): (JSC::B3::Air::UnifiedTmpLivenessAdapter::valueToIndex): (JSC::B3::Air::UnifiedTmpLivenessAdapter::indexToValue): * b3/air/AirLivenessConstraints.h: Removed. * b3/air/AirRegLiveness.h: (JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc): * b3/air/AirTmp.cpp: * b3/air/AirTmp.h: * b3/air/AirTmpInlines.h: (JSC::B3::Air::Tmp::LinearlyIndexed::LinearlyIndexed): (JSC::B3::Air::Tmp::LinearlyIndexed::index): (JSC::B3::Air::Tmp::linearlyIndexed): (JSC::B3::Air::Tmp::indexEnd): (JSC::B3::Air::Tmp::absoluteIndexEnd): (JSC::B3::Air::Tmp::linearIndexEnd): (JSC::B3::Air::Tmp::tmpForAbsoluteIndex): (JSC::B3::Air::Tmp::tmpForLinearIndex): * b3/air/AirTmpMap.h: Added. (JSC::B3::Air::TmpMap::TmpMap): (JSC::B3::Air::TmpMap::resize): (JSC::B3::Air::TmpMap::clear): (JSC::B3::Air::TmpMap::operator[]): (JSC::B3::Air::TmpMap::append): Source/WTF: Have Liveness<> call Adapter::prepareToCompute(), since this makes it a lot easier to implement constraint generation, since the constraint generator now gets to run after the Adapter is fully constructed. * wtf/IndexMap.h: (WTF::IndexMap::append): Also make this a bit more versatile. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::Iterable::contains): (WTF::Liveness::compute): Canonical link: https://commits.webkit.org/187500@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-07 00:11:16 +00:00
return m_liveness.m_workset.contains(m_liveness.valueToIndex(thing));
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
}
private:
Liveness& m_liveness;
};
Iterable live() const
{
return Iterable(m_liveness);
}
bool isLive(const typename Adapter::Thing& thing) const
{
return live().contains(thing);
}
void execute(unsigned instIndex)
{
auto& workset = m_liveness.m_workset;
WTF::Liveness should have an API that focuses on actions at instruction boundaries https://bugs.webkit.org/show_bug.cgi?id=170407 Reviewed by Keith Miller. Source/JavaScriptCore: Adopt changes to the WTF::Liveness<> API. Instead of having separate functions for the early/late versions of uses and defs, we now have just a use/def API. Those automatically take care of eary/late issues as needed. This reduces the API surface between WTF::Liveness<> and its clients, which makes it easier to implement some other optimizations I'm thinking about. * b3/B3VariableLiveness.h: (JSC::B3::VariableLivenessAdapter::forEachUse): (JSC::B3::VariableLivenessAdapter::forEachDef): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): Deleted. (JSC::B3::VariableLivenessAdapter::forEachLateUse): Deleted. (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): Deleted. (JSC::B3::VariableLivenessAdapter::forEachLateDef): Deleted. * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachUse): (JSC::B3::Air::LivenessAdapter::forEachDef): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): Deleted. (JSC::B3::Air::LivenessAdapter::forEachLateUse): Deleted. (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): Deleted. (JSC::B3::Air::LivenessAdapter::forEachLateDef): Deleted. Source/WTF: Change the Liveness<> API to handle early and late things in one lump inside forEachUse and forEachDef functions. This reduces the amount of different functions that Liveness<> expects from its adaptor. This makes it easier to implement optimizations that cache the use/def behavior of each instruction boundary. * wtf/Liveness.h: (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::execute): Canonical link: https://commits.webkit.org/187336@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-03 20:50:33 +00:00
// Want an easy example to help you visualize how this works?
// Check out B3VariableLiveness.h.
//
// Want a hard example to help you understand the hard cases?
// Check out AirLiveness.h.
m_liveness.forEachDef(
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
m_block, instIndex + 1,
[&] (unsigned index) {
workset.remove(index);
});
WTF::Liveness should have an API that focuses on actions at instruction boundaries https://bugs.webkit.org/show_bug.cgi?id=170407 Reviewed by Keith Miller. Source/JavaScriptCore: Adopt changes to the WTF::Liveness<> API. Instead of having separate functions for the early/late versions of uses and defs, we now have just a use/def API. Those automatically take care of eary/late issues as needed. This reduces the API surface between WTF::Liveness<> and its clients, which makes it easier to implement some other optimizations I'm thinking about. * b3/B3VariableLiveness.h: (JSC::B3::VariableLivenessAdapter::forEachUse): (JSC::B3::VariableLivenessAdapter::forEachDef): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): Deleted. (JSC::B3::VariableLivenessAdapter::forEachLateUse): Deleted. (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): Deleted. (JSC::B3::VariableLivenessAdapter::forEachLateDef): Deleted. * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachUse): (JSC::B3::Air::LivenessAdapter::forEachDef): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): Deleted. (JSC::B3::Air::LivenessAdapter::forEachLateUse): Deleted. (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): Deleted. (JSC::B3::Air::LivenessAdapter::forEachLateDef): Deleted. Source/WTF: Change the Liveness<> API to handle early and late things in one lump inside forEachUse and forEachDef functions. This reduces the amount of different functions that Liveness<> expects from its adaptor. This makes it easier to implement optimizations that cache the use/def behavior of each instruction boundary. * wtf/Liveness.h: (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::execute): Canonical link: https://commits.webkit.org/187336@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214836 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-03 20:50:33 +00:00
m_liveness.forEachUse(
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
m_block, instIndex,
[&] (unsigned index) {
workset.add(index);
});
}
private:
Liveness& m_liveness;
typename CFG::Node m_block;
};
const IndexVector& rawLiveAtHead(typename CFG::Node block)
{
return m_liveAtHead[block];
}
template<typename UnderlyingIterable>
class Iterable {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
public:
Iterable(Liveness& liveness, const UnderlyingIterable& iterable)
: m_liveness(liveness)
, m_iterable(iterable)
{
}
class iterator {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
public:
iterator()
: m_liveness(nullptr)
, m_iter()
{
}
iterator(Liveness& liveness, typename UnderlyingIterable::const_iterator iter)
: m_liveness(&liveness)
, m_iter(iter)
{
}
typename Adapter::Thing operator*()
{
return m_liveness->indexToValue(*m_iter);
}
iterator& operator++()
{
++m_iter;
return *this;
}
bool operator==(const iterator& other) const
{
ASSERT(m_liveness == other.m_liveness);
return m_iter == other.m_iter;
}
bool operator!=(const iterator& other) const
{
return !(*this == other);
}
private:
Liveness* m_liveness;
typename UnderlyingIterable::const_iterator m_iter;
};
iterator begin() const { return iterator(m_liveness, m_iterable.begin()); }
iterator end() const { return iterator(m_liveness, m_iterable.end()); }
bool contains(const typename Adapter::Thing& thing) const
{
Linear scan should run liveness only once https://bugs.webkit.org/show_bug.cgi?id=170569 Reviewed by Keith Miller. Source/JavaScriptCore: Air has a longstanding design bug that Tmps from different banks are indexed independently. This means that all of our analyses over Tmps do separate GP and FP passes. This does have some marginal benefits (the rest of the algorithm is specialized for Bank) but it's probably net bad. However, I don't want to think about solving that general problem. Instead, this just makes linear scan use a UnifiedTmpLiveness that uses a single "linear" indexing for GP and FP. This lets me avoid the much larger refactoring (which would involve substantial changes in graph coloring) while getting the bulk of the benefit (liveness runs once, instead of twice, for linear scan). This patch implements a lot of plumbing to make it possible for Liveness<> to view Tmps as having a unified indexing scheme. Tmp calls this LinearlyIndexed (to match the naming convention of AbsolutelyIndexed and Indexed), while AirLiveness calls this UnifiedTmpLiveness. With this change, -O1 never does any liveness analysis that uses separate GP and FP passes. I think this eliminates any urgency from the larger Tmp indexing bug. We can probably live with graph coloring doing separate passes. This is a ~6% speed-up for wasm -O1 compile times. I think this means that linear scan is no longer the longest pole in the tent. * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3VariableLiveness.h: (JSC::B3::VariableLivenessAdapter::prepareToCompute): * b3/air/AirAllocateRegistersByLinearScan.cpp: (JSC::B3::Air::allocateRegistersByLinearScan): * b3/air/AirCode.h: (JSC::B3::Air::Code::forEachTmp): * b3/air/AirLiveness.h: * b3/air/AirLivenessAdapter.h: (JSC::B3::Air::LivenessAdapter::Actions::Actions): (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::adapter): (JSC::B3::Air::LivenessAdapter::prepareToCompute): (JSC::B3::Air::LivenessAdapter::actionsAt): (JSC::B3::Air::LivenessAdapter::forEachUse): (JSC::B3::Air::LivenessAdapter::forEachDef): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::UnifiedTmpLivenessAdapter::UnifiedTmpLivenessAdapter): (JSC::B3::Air::UnifiedTmpLivenessAdapter::numIndices): (JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsBank): (JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsRole): (JSC::B3::Air::UnifiedTmpLivenessAdapter::valueToIndex): (JSC::B3::Air::UnifiedTmpLivenessAdapter::indexToValue): * b3/air/AirLivenessConstraints.h: Removed. * b3/air/AirRegLiveness.h: (JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc): * b3/air/AirTmp.cpp: * b3/air/AirTmp.h: * b3/air/AirTmpInlines.h: (JSC::B3::Air::Tmp::LinearlyIndexed::LinearlyIndexed): (JSC::B3::Air::Tmp::LinearlyIndexed::index): (JSC::B3::Air::Tmp::linearlyIndexed): (JSC::B3::Air::Tmp::indexEnd): (JSC::B3::Air::Tmp::absoluteIndexEnd): (JSC::B3::Air::Tmp::linearIndexEnd): (JSC::B3::Air::Tmp::tmpForAbsoluteIndex): (JSC::B3::Air::Tmp::tmpForLinearIndex): * b3/air/AirTmpMap.h: Added. (JSC::B3::Air::TmpMap::TmpMap): (JSC::B3::Air::TmpMap::resize): (JSC::B3::Air::TmpMap::clear): (JSC::B3::Air::TmpMap::operator[]): (JSC::B3::Air::TmpMap::append): Source/WTF: Have Liveness<> call Adapter::prepareToCompute(), since this makes it a lot easier to implement constraint generation, since the constraint generator now gets to run after the Adapter is fully constructed. * wtf/IndexMap.h: (WTF::IndexMap::append): Also make this a bit more versatile. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::Iterable::contains): (WTF::Liveness::compute): Canonical link: https://commits.webkit.org/187500@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-07 00:11:16 +00:00
return m_liveness.m_workset.contains(m_liveness.valueToIndex(thing));
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
}
private:
Liveness& m_liveness;
const UnderlyingIterable& m_iterable;
};
Iterable<IndexVector> liveAtHead(typename CFG::Node block)
{
return Iterable<IndexVector>(*this, m_liveAtHead[block]);
}
Iterable<IndexVector> liveAtTail(typename CFG::Node block)
{
return Iterable<IndexVector>(*this, m_liveAtTail[block]);
}
B3::fixSSA() needs a tune-up https://bugs.webkit.org/show_bug.cgi?id=170485 Reviewed by Saam Barati. Source/JavaScriptCore: After the various optimizations to liveness, register allocation, and other phases, the fixSSA() phase now looks like one of the top offenders. This includes a bunch of changes to make this phase run faster. This is a ~7% wasm -O1 compile time progression. Here's what I did: - We now use IndexSparseSet instead of IndexMap for tracking variable values. This makes it cheaper to chew through small blocks while there is a non-trivial number of total variables. - We now do a "local SSA conversion" pass before anything else. This eliminates obvious Get's. If we were using temporary Variables, it would eliminate many of those. That's useful for when we use demoteValues() and duplciateTails(). For wasm -O1, we mainly care about the fact that it makes a bunch of Set's dead. - We now do a Set DCE pass after the local SSA but before SSA conversion. This ensures that any block-local live intervals of Variables disappear and don't need further consideration. - We now cache the reaching defs calculation. - We now perform the reaching defs calculation lazily. * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): (JSC::B3::fixSSA): * b3/B3SSACalculator.cpp: (JSC::B3::SSACalculator::reachingDefAtTail): * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * dfg/DFGLivenessAnalysisPhase.cpp: (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): Deleted. (JSC::DFG::LivenessAnalysisPhase::run): Deleted. (JSC::DFG::LivenessAnalysisPhase::processBlock): Deleted. Source/WTF: This makes IndexSparseSet capable of being used as a map if you instantiate it with KeyValuePair<unsigned, ValueType>. * wtf/HashTraits.h: * wtf/IndexSparseSet.h: (WTF::DefaultIndexSparseSetTraits::create): (WTF::DefaultIndexSparseSetTraits::key): (WTF::OverflowHandler>::IndexSparseSet): (WTF::OverflowHandler>::add): (WTF::OverflowHandler>::set): (WTF::OverflowHandler>::remove): (WTF::OverflowHandler>::clear): (WTF::OverflowHandler>::size): (WTF::OverflowHandler>::isEmpty): (WTF::OverflowHandler>::contains): (WTF::OverflowHandler>::sort): (WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet): Deleted. (WTF::IndexSparseSet<OverflowHandler>::add): Deleted. (WTF::IndexSparseSet<OverflowHandler>::remove): Deleted. (WTF::IndexSparseSet<OverflowHandler>::clear): Deleted. (WTF::IndexSparseSet<OverflowHandler>::size): Deleted. (WTF::IndexSparseSet<OverflowHandler>::isEmpty): Deleted. (WTF::IndexSparseSet<OverflowHandler>::contains): Deleted. (WTF::IndexSparseSet<OverflowHandler>::sort): Deleted. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::workset): Canonical link: https://commits.webkit.org/187401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-05 00:25:02 +00:00
Workset& workset() { return m_workset; }
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
class LiveAtHead {
[WTF][JSC] Make JSC and WTF aggressively-fast-malloced https://bugs.webkit.org/show_bug.cgi?id=200611 Reviewed by Saam Barati. Source/JavaScriptCore: This patch aggressively puts many classes into FastMalloc. In JSC side, we grep `std::make_unique` etc. to find potentially system-malloc-allocated classes. After this patch, all the JSC related allocations in JetStream2 cli is done from bmalloc. In the future, it would be nice that we add `WTF::makeUnique<T>` helper function and throw a compile error if `T` is not FastMalloc annotated[1]. Putting WebKit classes in FastMalloc has many benefits. 1. Simply, it is fast. 2. vmmap can tell the amount of memory used for WebKit. 3. bmalloc can isolate WebKit memory allocation from the rest of the world. This is useful since we can know more about what component is corrupting the memory from the memory corruption crash. [1]: https://bugs.webkit.org/show_bug.cgi?id=200620 * API/ObjCCallbackFunction.mm: * assembler/AbstractMacroAssembler.h: * b3/B3PhiChildren.h: * b3/air/AirAllocateRegistersAndStackAndGenerateCode.h: * b3/air/AirDisassembler.h: * bytecode/AccessCaseSnippetParams.h: * bytecode/CallVariant.h: * bytecode/DeferredSourceDump.h: * bytecode/ExecutionCounter.h: * bytecode/GetByIdStatus.h: * bytecode/GetByIdVariant.h: * bytecode/InByIdStatus.h: * bytecode/InByIdVariant.h: * bytecode/InstanceOfStatus.h: * bytecode/InstanceOfVariant.h: * bytecode/PutByIdStatus.h: * bytecode/PutByIdVariant.h: * bytecode/ValueProfile.h: * dfg/DFGAbstractInterpreter.h: * dfg/DFGByteCodeParser.cpp: (JSC::DFG::ByteCodeParser::newVariableAccessData): * dfg/DFGFlowIndexing.h: * dfg/DFGFlowMap.h: * dfg/DFGLiveCatchVariablePreservationPhase.cpp: (JSC::DFG::LiveCatchVariablePreservationPhase::newVariableAccessData): * dfg/DFGMaximalFlushInsertionPhase.cpp: (JSC::DFG::MaximalFlushInsertionPhase::newVariableAccessData): * dfg/DFGOSRExit.h: * dfg/DFGSpeculativeJIT.h: * dfg/DFGVariableAccessData.h: * disassembler/ARM64/A64DOpcode.h: * inspector/remote/socket/RemoteInspectorMessageParser.h: * inspector/remote/socket/RemoteInspectorSocket.h: * inspector/remote/socket/RemoteInspectorSocketEndpoint.h: * jit/PCToCodeOriginMap.h: * runtime/BasicBlockLocation.h: * runtime/DoublePredictionFuzzerAgent.h: * runtime/JSRunLoopTimer.h: * runtime/PromiseDeferredTimer.h: (JSC::PromiseDeferredTimer::create): PromiseDeferredTimer should be allocated as `Ref<>` instead of `std::unique_ptr` since it is inheriting ThreadSafeRefCounted<>. Holding such a class with std::unique_ptr could lead to potentially dangerous operations (like, someone holds it with Ref<> while it is deleted by std::unique_ptr<>). * runtime/RandomizingFuzzerAgent.h: * runtime/SymbolTable.h: * runtime/VM.cpp: (JSC::VM::VM): * runtime/VM.h: * tools/JSDollarVM.cpp: * tools/SigillCrashAnalyzer.cpp: * wasm/WasmFormat.h: * wasm/WasmMemory.cpp: * wasm/WasmSignature.h: * yarr/YarrJIT.h: Source/WebCore: Changed the accessor since we changed std::unique_ptr to Ref for this field. No behavior change. * bindings/js/WorkerScriptController.cpp: (WebCore::WorkerScriptController::addTimerSetNotification): (WebCore::WorkerScriptController::removeTimerSetNotification): Source/WTF: WTF has many data structures, in particular, containers. And these containers can be allocated like `std::make_unique<Container>()`. Without WTF_MAKE_FAST_ALLOCATED, this container itself is allocated from the system malloc. This patch attaches WTF_MAKE_FAST_ALLOCATED more aggressively not to allocate them from the system malloc. And we add some `final` to containers and classes that would be never inherited. * wtf/Assertions.cpp: * wtf/Atomics.h: * wtf/AutodrainedPool.h: * wtf/Bag.h: (WTF::Bag::Bag): Deleted. (WTF::Bag::~Bag): Deleted. (WTF::Bag::clear): Deleted. (WTF::Bag::add): Deleted. (WTF::Bag::iterator::iterator): Deleted. (WTF::Bag::iterator::operator! const): Deleted. (WTF::Bag::iterator::operator* const): Deleted. (WTF::Bag::iterator::operator++): Deleted. (WTF::Bag::iterator::operator== const): Deleted. (WTF::Bag::iterator::operator!= const): Deleted. (WTF::Bag::begin): Deleted. (WTF::Bag::begin const): Deleted. (WTF::Bag::end const): Deleted. (WTF::Bag::isEmpty const): Deleted. (WTF::Bag::unwrappedHead const): Deleted. * wtf/BitVector.h: (WTF::BitVector::BitVector): Deleted. (WTF::BitVector::~BitVector): Deleted. (WTF::BitVector::operator=): Deleted. (WTF::BitVector::size const): Deleted. (WTF::BitVector::ensureSize): Deleted. (WTF::BitVector::quickGet const): Deleted. (WTF::BitVector::quickSet): Deleted. (WTF::BitVector::quickClear): Deleted. (WTF::BitVector::get const): Deleted. (WTF::BitVector::contains const): Deleted. (WTF::BitVector::set): Deleted. (WTF::BitVector::add): Deleted. (WTF::BitVector::ensureSizeAndSet): Deleted. (WTF::BitVector::clear): Deleted. (WTF::BitVector::remove): Deleted. (WTF::BitVector::merge): Deleted. (WTF::BitVector::filter): Deleted. (WTF::BitVector::exclude): Deleted. (WTF::BitVector::bitCount const): Deleted. (WTF::BitVector::isEmpty const): Deleted. (WTF::BitVector::findBit const): Deleted. (WTF::BitVector::isEmptyValue const): Deleted. (WTF::BitVector::isDeletedValue const): Deleted. (WTF::BitVector::isEmptyOrDeletedValue const): Deleted. (WTF::BitVector::operator== const): Deleted. (WTF::BitVector::hash const): Deleted. (WTF::BitVector::iterator::iterator): Deleted. (WTF::BitVector::iterator::operator* const): Deleted. (WTF::BitVector::iterator::operator++): Deleted. (WTF::BitVector::iterator::isAtEnd const): Deleted. (WTF::BitVector::iterator::operator== const): Deleted. (WTF::BitVector::iterator::operator!= const): Deleted. (WTF::BitVector::begin const): Deleted. (WTF::BitVector::end const): Deleted. (WTF::BitVector::bitsInPointer): Deleted. (WTF::BitVector::maxInlineBits): Deleted. (WTF::BitVector::byteCount): Deleted. (WTF::BitVector::makeInlineBits): Deleted. (WTF::BitVector::cleanseInlineBits): Deleted. (WTF::BitVector::bitCount): Deleted. (WTF::BitVector::findBitFast const): Deleted. (WTF::BitVector::findBitSimple const): Deleted. (WTF::BitVector::OutOfLineBits::numBits const): Deleted. (WTF::BitVector::OutOfLineBits::numWords const): Deleted. (WTF::BitVector::OutOfLineBits::bits): Deleted. (WTF::BitVector::OutOfLineBits::bits const): Deleted. (WTF::BitVector::OutOfLineBits::OutOfLineBits): Deleted. (WTF::BitVector::isInline const): Deleted. (WTF::BitVector::outOfLineBits const): Deleted. (WTF::BitVector::outOfLineBits): Deleted. (WTF::BitVector::bits): Deleted. (WTF::BitVector::bits const): Deleted. * wtf/Bitmap.h: (WTF::Bitmap::size): Deleted. (WTF::Bitmap::iterator::iterator): Deleted. (WTF::Bitmap::iterator::operator* const): Deleted. (WTF::Bitmap::iterator::operator++): Deleted. (WTF::Bitmap::iterator::operator== const): Deleted. (WTF::Bitmap::iterator::operator!= const): Deleted. (WTF::Bitmap::begin const): Deleted. (WTF::Bitmap::end const): Deleted. * wtf/Box.h: * wtf/BumpPointerAllocator.h: * wtf/CPUTime.h: * wtf/CheckedBoolean.h: * wtf/CommaPrinter.h: (WTF::CommaPrinter::CommaPrinter): Deleted. (WTF::CommaPrinter::dump const): Deleted. (WTF::CommaPrinter::didPrint const): Deleted. * wtf/CompactPointerTuple.h: (WTF::CompactPointerTuple::encodeType): Deleted. (WTF::CompactPointerTuple::decodeType): Deleted. (WTF::CompactPointerTuple::CompactPointerTuple): Deleted. (WTF::CompactPointerTuple::pointer const): Deleted. (WTF::CompactPointerTuple::setPointer): Deleted. (WTF::CompactPointerTuple::type const): Deleted. (WTF::CompactPointerTuple::setType): Deleted. * wtf/CompilationThread.h: (WTF::CompilationScope::CompilationScope): Deleted. (WTF::CompilationScope::~CompilationScope): Deleted. (WTF::CompilationScope::leaveEarly): Deleted. * wtf/CompletionHandler.h: (WTF::CompletionHandler<Out): (WTF::Detail::CallableWrapper<CompletionHandler<Out): (WTF::CompletionHandlerCallingScope::CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::~CompletionHandlerCallingScope): Deleted. (WTF::CompletionHandlerCallingScope::CompletionHandler<void): Deleted. * wtf/ConcurrentBuffer.h: (WTF::ConcurrentBuffer::ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::~ConcurrentBuffer): Deleted. (WTF::ConcurrentBuffer::growExact): Deleted. (WTF::ConcurrentBuffer::grow): Deleted. (WTF::ConcurrentBuffer::array const): Deleted. (WTF::ConcurrentBuffer::operator[]): Deleted. (WTF::ConcurrentBuffer::operator[] const): Deleted. (WTF::ConcurrentBuffer::createArray): Deleted. * wtf/ConcurrentPtrHashSet.h: (WTF::ConcurrentPtrHashSet::contains): Deleted. (WTF::ConcurrentPtrHashSet::add): Deleted. (WTF::ConcurrentPtrHashSet::size const): Deleted. (WTF::ConcurrentPtrHashSet::Table::maxLoad const): Deleted. (WTF::ConcurrentPtrHashSet::hash): Deleted. (WTF::ConcurrentPtrHashSet::cast): Deleted. (WTF::ConcurrentPtrHashSet::containsImpl const): Deleted. (WTF::ConcurrentPtrHashSet::addImpl): Deleted. * wtf/ConcurrentVector.h: (WTF::ConcurrentVector::~ConcurrentVector): Deleted. (WTF::ConcurrentVector::size const): Deleted. (WTF::ConcurrentVector::isEmpty const): Deleted. (WTF::ConcurrentVector::at): Deleted. (WTF::ConcurrentVector::at const): Deleted. (WTF::ConcurrentVector::operator[]): Deleted. (WTF::ConcurrentVector::operator[] const): Deleted. (WTF::ConcurrentVector::first): Deleted. (WTF::ConcurrentVector::first const): Deleted. (WTF::ConcurrentVector::last): Deleted. (WTF::ConcurrentVector::last const): Deleted. (WTF::ConcurrentVector::takeLast): Deleted. (WTF::ConcurrentVector::append): Deleted. (WTF::ConcurrentVector::alloc): Deleted. (WTF::ConcurrentVector::removeLast): Deleted. (WTF::ConcurrentVector::grow): Deleted. (WTF::ConcurrentVector::begin): Deleted. (WTF::ConcurrentVector::end): Deleted. (WTF::ConcurrentVector::segmentExistsFor): Deleted. (WTF::ConcurrentVector::segmentFor): Deleted. (WTF::ConcurrentVector::subscriptFor): Deleted. (WTF::ConcurrentVector::ensureSegmentsFor): Deleted. (WTF::ConcurrentVector::ensureSegment): Deleted. (WTF::ConcurrentVector::allocateSegment): Deleted. * wtf/Condition.h: (WTF::Condition::waitUntil): Deleted. (WTF::Condition::waitFor): Deleted. (WTF::Condition::wait): Deleted. (WTF::Condition::notifyOne): Deleted. (WTF::Condition::notifyAll): Deleted. * wtf/CountingLock.h: (WTF::CountingLock::LockHooks::lockHook): Deleted. (WTF::CountingLock::LockHooks::unlockHook): Deleted. (WTF::CountingLock::LockHooks::parkHook): Deleted. (WTF::CountingLock::LockHooks::handoffHook): Deleted. (WTF::CountingLock::tryLock): Deleted. (WTF::CountingLock::lock): Deleted. (WTF::CountingLock::unlock): Deleted. (WTF::CountingLock::isHeld const): Deleted. (WTF::CountingLock::isLocked const): Deleted. (WTF::CountingLock::Count::operator bool const): Deleted. (WTF::CountingLock::Count::operator== const): Deleted. (WTF::CountingLock::Count::operator!= const): Deleted. (WTF::CountingLock::tryOptimisticRead): Deleted. (WTF::CountingLock::validate): Deleted. (WTF::CountingLock::doOptimizedRead): Deleted. (WTF::CountingLock::tryOptimisticFencelessRead): Deleted. (WTF::CountingLock::fencelessValidate): Deleted. (WTF::CountingLock::doOptimizedFencelessRead): Deleted. (WTF::CountingLock::getCount): Deleted. * wtf/CrossThreadQueue.h: * wtf/CrossThreadTask.h: * wtf/CryptographicallyRandomNumber.cpp: * wtf/DataMutex.h: * wtf/DateMath.h: * wtf/Deque.h: (WTF::Deque::size const): Deleted. (WTF::Deque::isEmpty const): Deleted. (WTF::Deque::begin): Deleted. (WTF::Deque::end): Deleted. (WTF::Deque::begin const): Deleted. (WTF::Deque::end const): Deleted. (WTF::Deque::rbegin): Deleted. (WTF::Deque::rend): Deleted. (WTF::Deque::rbegin const): Deleted. (WTF::Deque::rend const): Deleted. (WTF::Deque::first): Deleted. (WTF::Deque::first const): Deleted. (WTF::Deque::last): Deleted. (WTF::Deque::last const): Deleted. (WTF::Deque::append): Deleted. * wtf/Dominators.h: * wtf/DoublyLinkedList.h: * wtf/Expected.h: * wtf/FastBitVector.h: * wtf/FileMetadata.h: * wtf/FileSystem.h: * wtf/GraphNodeWorklist.h: * wtf/GregorianDateTime.h: (WTF::GregorianDateTime::GregorianDateTime): Deleted. (WTF::GregorianDateTime::year const): Deleted. (WTF::GregorianDateTime::month const): Deleted. (WTF::GregorianDateTime::yearDay const): Deleted. (WTF::GregorianDateTime::monthDay const): Deleted. (WTF::GregorianDateTime::weekDay const): Deleted. (WTF::GregorianDateTime::hour const): Deleted. (WTF::GregorianDateTime::minute const): Deleted. (WTF::GregorianDateTime::second const): Deleted. (WTF::GregorianDateTime::utcOffset const): Deleted. (WTF::GregorianDateTime::isDST const): Deleted. (WTF::GregorianDateTime::setYear): Deleted. (WTF::GregorianDateTime::setMonth): Deleted. (WTF::GregorianDateTime::setYearDay): Deleted. (WTF::GregorianDateTime::setMonthDay): Deleted. (WTF::GregorianDateTime::setWeekDay): Deleted. (WTF::GregorianDateTime::setHour): Deleted. (WTF::GregorianDateTime::setMinute): Deleted. (WTF::GregorianDateTime::setSecond): Deleted. (WTF::GregorianDateTime::setUtcOffset): Deleted. (WTF::GregorianDateTime::setIsDST): Deleted. (WTF::GregorianDateTime::operator tm const): Deleted. (WTF::GregorianDateTime::copyFrom): Deleted. * wtf/HashTable.h: * wtf/Hasher.h: * wtf/HexNumber.h: * wtf/Indenter.h: * wtf/IndexMap.h: * wtf/IndexSet.h: * wtf/IndexSparseSet.h: * wtf/IndexedContainerIterator.h: * wtf/Insertion.h: * wtf/IteratorAdaptors.h: * wtf/IteratorRange.h: * wtf/KeyValuePair.h: * wtf/ListHashSet.h: (WTF::ListHashSet::begin): Deleted. (WTF::ListHashSet::end): Deleted. (WTF::ListHashSet::begin const): Deleted. (WTF::ListHashSet::end const): Deleted. (WTF::ListHashSet::random): Deleted. (WTF::ListHashSet::random const): Deleted. (WTF::ListHashSet::rbegin): Deleted. (WTF::ListHashSet::rend): Deleted. (WTF::ListHashSet::rbegin const): Deleted. (WTF::ListHashSet::rend const): Deleted. * wtf/Liveness.h: * wtf/LocklessBag.h: (WTF::LocklessBag::LocklessBag): Deleted. (WTF::LocklessBag::add): Deleted. (WTF::LocklessBag::iterate): Deleted. (WTF::LocklessBag::consumeAll): Deleted. (WTF::LocklessBag::consumeAllWithNode): Deleted. (WTF::LocklessBag::~LocklessBag): Deleted. * wtf/LoggingHashID.h: * wtf/MD5.h: * wtf/MachSendRight.h: * wtf/MainThreadData.h: * wtf/Markable.h: * wtf/MediaTime.h: * wtf/MemoryPressureHandler.h: * wtf/MessageQueue.h: (WTF::MessageQueue::MessageQueue): Deleted. * wtf/MetaAllocator.h: * wtf/MonotonicTime.h: (WTF::MonotonicTime::MonotonicTime): Deleted. (WTF::MonotonicTime::fromRawSeconds): Deleted. (WTF::MonotonicTime::infinity): Deleted. (WTF::MonotonicTime::nan): Deleted. (WTF::MonotonicTime::secondsSinceEpoch const): Deleted. (WTF::MonotonicTime::approximateMonotonicTime const): Deleted. (WTF::MonotonicTime::operator bool const): Deleted. (WTF::MonotonicTime::operator+ const): Deleted. (WTF::MonotonicTime::operator- const): Deleted. (WTF::MonotonicTime::operator% const): Deleted. (WTF::MonotonicTime::operator+=): Deleted. (WTF::MonotonicTime::operator-=): Deleted. (WTF::MonotonicTime::operator== const): Deleted. (WTF::MonotonicTime::operator!= const): Deleted. (WTF::MonotonicTime::operator< const): Deleted. (WTF::MonotonicTime::operator> const): Deleted. (WTF::MonotonicTime::operator<= const): Deleted. (WTF::MonotonicTime::operator>= const): Deleted. (WTF::MonotonicTime::isolatedCopy const): Deleted. (WTF::MonotonicTime::encode const): Deleted. (WTF::MonotonicTime::decode): Deleted. * wtf/NaturalLoops.h: * wtf/NoLock.h: * wtf/OSAllocator.h: * wtf/OptionSet.h: * wtf/Optional.h: * wtf/OrderMaker.h: * wtf/Packed.h: (WTF::alignof): * wtf/PackedIntVector.h: (WTF::PackedIntVector::PackedIntVector): Deleted. (WTF::PackedIntVector::operator=): Deleted. (WTF::PackedIntVector::size const): Deleted. (WTF::PackedIntVector::ensureSize): Deleted. (WTF::PackedIntVector::resize): Deleted. (WTF::PackedIntVector::clearAll): Deleted. (WTF::PackedIntVector::get const): Deleted. (WTF::PackedIntVector::set): Deleted. (WTF::PackedIntVector::mask): Deleted. * wtf/PageBlock.h: * wtf/ParallelJobsOpenMP.h: * wtf/ParkingLot.h: * wtf/PriorityQueue.h: (WTF::PriorityQueue::size const): Deleted. (WTF::PriorityQueue::isEmpty const): Deleted. (WTF::PriorityQueue::enqueue): Deleted. (WTF::PriorityQueue::peek const): Deleted. (WTF::PriorityQueue::dequeue): Deleted. (WTF::PriorityQueue::decreaseKey): Deleted. (WTF::PriorityQueue::increaseKey): Deleted. (WTF::PriorityQueue::begin const): Deleted. (WTF::PriorityQueue::end const): Deleted. (WTF::PriorityQueue::isValidHeap const): Deleted. (WTF::PriorityQueue::parentOf): Deleted. (WTF::PriorityQueue::leftChildOf): Deleted. (WTF::PriorityQueue::rightChildOf): Deleted. (WTF::PriorityQueue::siftUp): Deleted. (WTF::PriorityQueue::siftDown): Deleted. * wtf/RandomDevice.h: * wtf/Range.h: * wtf/RangeSet.h: (WTF::RangeSet::RangeSet): Deleted. (WTF::RangeSet::~RangeSet): Deleted. (WTF::RangeSet::add): Deleted. (WTF::RangeSet::contains const): Deleted. (WTF::RangeSet::overlaps const): Deleted. (WTF::RangeSet::clear): Deleted. (WTF::RangeSet::dump const): Deleted. (WTF::RangeSet::dumpRaw const): Deleted. (WTF::RangeSet::begin const): Deleted. (WTF::RangeSet::end const): Deleted. (WTF::RangeSet::addAll): Deleted. (WTF::RangeSet::compact): Deleted. (WTF::RangeSet::overlapsNonEmpty): Deleted. (WTF::RangeSet::subsumesNonEmpty): Deleted. (WTF::RangeSet::findRange const): Deleted. * wtf/RecursableLambda.h: * wtf/RedBlackTree.h: (WTF::RedBlackTree::Node::successor const): Deleted. (WTF::RedBlackTree::Node::predecessor const): Deleted. (WTF::RedBlackTree::Node::successor): Deleted. (WTF::RedBlackTree::Node::predecessor): Deleted. (WTF::RedBlackTree::Node::reset): Deleted. (WTF::RedBlackTree::Node::parent const): Deleted. (WTF::RedBlackTree::Node::setParent): Deleted. (WTF::RedBlackTree::Node::left const): Deleted. (WTF::RedBlackTree::Node::setLeft): Deleted. (WTF::RedBlackTree::Node::right const): Deleted. (WTF::RedBlackTree::Node::setRight): Deleted. (WTF::RedBlackTree::Node::color const): Deleted. (WTF::RedBlackTree::Node::setColor): Deleted. (WTF::RedBlackTree::RedBlackTree): Deleted. (WTF::RedBlackTree::insert): Deleted. (WTF::RedBlackTree::remove): Deleted. (WTF::RedBlackTree::findExact const): Deleted. (WTF::RedBlackTree::findLeastGreaterThanOrEqual const): Deleted. (WTF::RedBlackTree::findGreatestLessThanOrEqual const): Deleted. (WTF::RedBlackTree::first const): Deleted. (WTF::RedBlackTree::last const): Deleted. (WTF::RedBlackTree::size): Deleted. (WTF::RedBlackTree::isEmpty): Deleted. (WTF::RedBlackTree::treeMinimum): Deleted. (WTF::RedBlackTree::treeMaximum): Deleted. (WTF::RedBlackTree::treeInsert): Deleted. (WTF::RedBlackTree::leftRotate): Deleted. (WTF::RedBlackTree::rightRotate): Deleted. (WTF::RedBlackTree::removeFixup): Deleted. * wtf/ResourceUsage.h: * wtf/RunLoop.cpp: * wtf/RunLoopTimer.h: * wtf/SHA1.h: * wtf/Seconds.h: (WTF::Seconds::Seconds): Deleted. (WTF::Seconds::value const): Deleted. (WTF::Seconds::minutes const): Deleted. (WTF::Seconds::seconds const): Deleted. (WTF::Seconds::milliseconds const): Deleted. (WTF::Seconds::microseconds const): Deleted. (WTF::Seconds::nanoseconds const): Deleted. (WTF::Seconds::minutesAs const): Deleted. (WTF::Seconds::secondsAs const): Deleted. (WTF::Seconds::millisecondsAs const): Deleted. (WTF::Seconds::microsecondsAs const): Deleted. (WTF::Seconds::nanosecondsAs const): Deleted. (WTF::Seconds::fromMinutes): Deleted. (WTF::Seconds::fromHours): Deleted. (WTF::Seconds::fromMilliseconds): Deleted. (WTF::Seconds::fromMicroseconds): Deleted. (WTF::Seconds::fromNanoseconds): Deleted. (WTF::Seconds::infinity): Deleted. (WTF::Seconds::nan): Deleted. (WTF::Seconds::operator bool const): Deleted. (WTF::Seconds::operator+ const): Deleted. (WTF::Seconds::operator- const): Deleted. (WTF::Seconds::operator* const): Deleted. (WTF::Seconds::operator/ const): Deleted. (WTF::Seconds::operator% const): Deleted. (WTF::Seconds::operator+=): Deleted. (WTF::Seconds::operator-=): Deleted. (WTF::Seconds::operator*=): Deleted. (WTF::Seconds::operator/=): Deleted. (WTF::Seconds::operator%=): Deleted. (WTF::Seconds::operator== const): Deleted. (WTF::Seconds::operator!= const): Deleted. (WTF::Seconds::operator< const): Deleted. (WTF::Seconds::operator> const): Deleted. (WTF::Seconds::operator<= const): Deleted. (WTF::Seconds::operator>= const): Deleted. (WTF::Seconds::isolatedCopy const): Deleted. (WTF::Seconds::encode const): Deleted. (WTF::Seconds::decode): Deleted. * wtf/SegmentedVector.h: (WTF::SegmentedVector::~SegmentedVector): Deleted. (WTF::SegmentedVector::size const): Deleted. (WTF::SegmentedVector::isEmpty const): Deleted. (WTF::SegmentedVector::at): Deleted. (WTF::SegmentedVector::at const): Deleted. (WTF::SegmentedVector::operator[]): Deleted. (WTF::SegmentedVector::operator[] const): Deleted. (WTF::SegmentedVector::first): Deleted. (WTF::SegmentedVector::first const): Deleted. (WTF::SegmentedVector::last): Deleted. (WTF::SegmentedVector::last const): Deleted. (WTF::SegmentedVector::takeLast): Deleted. (WTF::SegmentedVector::append): Deleted. (WTF::SegmentedVector::alloc): Deleted. (WTF::SegmentedVector::removeLast): Deleted. (WTF::SegmentedVector::grow): Deleted. (WTF::SegmentedVector::clear): Deleted. (WTF::SegmentedVector::begin): Deleted. (WTF::SegmentedVector::end): Deleted. (WTF::SegmentedVector::shrinkToFit): Deleted. (WTF::SegmentedVector::deleteAllSegments): Deleted. (WTF::SegmentedVector::segmentExistsFor): Deleted. (WTF::SegmentedVector::segmentFor): Deleted. (WTF::SegmentedVector::subscriptFor): Deleted. (WTF::SegmentedVector::ensureSegmentsFor): Deleted. (WTF::SegmentedVector::ensureSegment): Deleted. (WTF::SegmentedVector::allocateSegment): Deleted. * wtf/SetForScope.h: * wtf/SingleRootGraph.h: * wtf/SinglyLinkedList.h: * wtf/SmallPtrSet.h: * wtf/SpanningTree.h: * wtf/Spectrum.h: * wtf/StackBounds.h: * wtf/StackShot.h: * wtf/StackShotProfiler.h: * wtf/StackStats.h: * wtf/StackTrace.h: * wtf/StreamBuffer.h: * wtf/SynchronizedFixedQueue.h: (WTF::SynchronizedFixedQueue::create): Deleted. (WTF::SynchronizedFixedQueue::open): Deleted. (WTF::SynchronizedFixedQueue::close): Deleted. (WTF::SynchronizedFixedQueue::isOpen): Deleted. (WTF::SynchronizedFixedQueue::enqueue): Deleted. (WTF::SynchronizedFixedQueue::dequeue): Deleted. (WTF::SynchronizedFixedQueue::SynchronizedFixedQueue): Deleted. * wtf/SystemTracing.h: * wtf/ThreadGroup.h: (WTF::ThreadGroup::create): Deleted. (WTF::ThreadGroup::threads const): Deleted. (WTF::ThreadGroup::getLock): Deleted. (WTF::ThreadGroup::weakFromThis): Deleted. * wtf/ThreadSpecific.h: * wtf/ThreadingPrimitives.h: (WTF::Mutex::impl): Deleted. * wtf/TimeWithDynamicClockType.h: (WTF::TimeWithDynamicClockType::TimeWithDynamicClockType): Deleted. (WTF::TimeWithDynamicClockType::fromRawSeconds): Deleted. (WTF::TimeWithDynamicClockType::secondsSinceEpoch const): Deleted. (WTF::TimeWithDynamicClockType::clockType const): Deleted. (WTF::TimeWithDynamicClockType::withSameClockAndRawSeconds const): Deleted. (WTF::TimeWithDynamicClockType::operator bool const): Deleted. (WTF::TimeWithDynamicClockType::operator+ const): Deleted. (WTF::TimeWithDynamicClockType::operator- const): Deleted. (WTF::TimeWithDynamicClockType::operator+=): Deleted. (WTF::TimeWithDynamicClockType::operator-=): Deleted. (WTF::TimeWithDynamicClockType::operator== const): Deleted. (WTF::TimeWithDynamicClockType::operator!= const): Deleted. * wtf/TimingScope.h: * wtf/TinyLRUCache.h: * wtf/TinyPtrSet.h: * wtf/URLParser.cpp: * wtf/URLParser.h: * wtf/Unexpected.h: * wtf/Variant.h: * wtf/WTFSemaphore.h: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::signal): Deleted. (WTF::Semaphore::waitUntil): Deleted. (WTF::Semaphore::waitFor): Deleted. (WTF::Semaphore::wait): Deleted. * wtf/WallTime.h: (WTF::WallTime::WallTime): Deleted. (WTF::WallTime::fromRawSeconds): Deleted. (WTF::WallTime::infinity): Deleted. (WTF::WallTime::nan): Deleted. (WTF::WallTime::secondsSinceEpoch const): Deleted. (WTF::WallTime::approximateWallTime const): Deleted. (WTF::WallTime::operator bool const): Deleted. (WTF::WallTime::operator+ const): Deleted. (WTF::WallTime::operator- const): Deleted. (WTF::WallTime::operator+=): Deleted. (WTF::WallTime::operator-=): Deleted. (WTF::WallTime::operator== const): Deleted. (WTF::WallTime::operator!= const): Deleted. (WTF::WallTime::operator< const): Deleted. (WTF::WallTime::operator> const): Deleted. (WTF::WallTime::operator<= const): Deleted. (WTF::WallTime::operator>= const): Deleted. (WTF::WallTime::isolatedCopy const): Deleted. * wtf/WeakHashSet.h: (WTF::WeakHashSet::WeakHashSetConstIterator::WeakHashSetConstIterator): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::get const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator* const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator-> const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator++): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::skipEmptyBuckets): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator== const): Deleted. (WTF::WeakHashSet::WeakHashSetConstIterator::operator!= const): Deleted. (WTF::WeakHashSet::WeakHashSet): Deleted. (WTF::WeakHashSet::begin const): Deleted. (WTF::WeakHashSet::end const): Deleted. (WTF::WeakHashSet::add): Deleted. (WTF::WeakHashSet::remove): Deleted. (WTF::WeakHashSet::contains const): Deleted. (WTF::WeakHashSet::capacity const): Deleted. (WTF::WeakHashSet::computesEmpty const): Deleted. (WTF::WeakHashSet::hasNullReferences const): Deleted. (WTF::WeakHashSet::computeSize const): Deleted. (WTF::WeakHashSet::checkConsistency const): Deleted. * wtf/WeakRandom.h: (WTF::WeakRandom::WeakRandom): Deleted. (WTF::WeakRandom::setSeed): Deleted. (WTF::WeakRandom::seed const): Deleted. (WTF::WeakRandom::get): Deleted. (WTF::WeakRandom::getUint32): Deleted. (WTF::WeakRandom::lowOffset): Deleted. (WTF::WeakRandom::highOffset): Deleted. (WTF::WeakRandom::nextState): Deleted. (WTF::WeakRandom::generate): Deleted. (WTF::WeakRandom::advance): Deleted. * wtf/WordLock.h: (WTF::WordLock::lock): Deleted. (WTF::WordLock::unlock): Deleted. (WTF::WordLock::isHeld const): Deleted. (WTF::WordLock::isLocked const): Deleted. (WTF::WordLock::isFullyReset const): Deleted. * wtf/generic/MainThreadGeneric.cpp: * wtf/glib/GMutexLocker.h: * wtf/linux/CurrentProcessMemoryStatus.h: * wtf/posix/ThreadingPOSIX.cpp: (WTF::Semaphore::Semaphore): Deleted. (WTF::Semaphore::~Semaphore): Deleted. (WTF::Semaphore::wait): Deleted. (WTF::Semaphore::post): Deleted. * wtf/text/ASCIILiteral.h: (WTF::ASCIILiteral::operator const char* const): Deleted. (WTF::ASCIILiteral::fromLiteralUnsafe): Deleted. (WTF::ASCIILiteral::null): Deleted. (WTF::ASCIILiteral::characters const): Deleted. (WTF::ASCIILiteral::ASCIILiteral): Deleted. * wtf/text/AtomString.h: (WTF::AtomString::operator=): Deleted. (WTF::AtomString::isHashTableDeletedValue const): Deleted. (WTF::AtomString::existingHash const): Deleted. (WTF::AtomString::operator const String& const): Deleted. (WTF::AtomString::string const): Deleted. (WTF::AtomString::impl const): Deleted. (WTF::AtomString::is8Bit const): Deleted. (WTF::AtomString::characters8 const): Deleted. (WTF::AtomString::characters16 const): Deleted. (WTF::AtomString::length const): Deleted. (WTF::AtomString::operator[] const): Deleted. (WTF::AtomString::contains const): Deleted. (WTF::AtomString::containsIgnoringASCIICase const): Deleted. (WTF::AtomString::find const): Deleted. (WTF::AtomString::findIgnoringASCIICase const): Deleted. (WTF::AtomString::startsWith const): Deleted. (WTF::AtomString::startsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::endsWith const): Deleted. (WTF::AtomString::endsWithIgnoringASCIICase const): Deleted. (WTF::AtomString::toInt const): Deleted. (WTF::AtomString::toDouble const): Deleted. (WTF::AtomString::toFloat const): Deleted. (WTF::AtomString::percentage const): Deleted. (WTF::AtomString::isNull const): Deleted. (WTF::AtomString::isEmpty const): Deleted. (WTF::AtomString::operator NSString * const): Deleted. * wtf/text/AtomStringImpl.h: (WTF::AtomStringImpl::lookUp): Deleted. (WTF::AtomStringImpl::add): Deleted. (WTF::AtomStringImpl::addWithStringTableProvider): Deleted. * wtf/text/CString.h: (WTF::CStringBuffer::data): Deleted. (WTF::CStringBuffer::length const): Deleted. (WTF::CStringBuffer::CStringBuffer): Deleted. (WTF::CStringBuffer::mutableData): Deleted. (WTF::CString::CString): Deleted. (WTF::CString::data const): Deleted. (WTF::CString::length const): Deleted. (WTF::CString::isNull const): Deleted. (WTF::CString::buffer const): Deleted. (WTF::CString::isHashTableDeletedValue const): Deleted. * wtf/text/ExternalStringImpl.h: (WTF::ExternalStringImpl::freeExternalBuffer): Deleted. * wtf/text/LineBreakIteratorPoolICU.h: * wtf/text/NullTextBreakIterator.h: * wtf/text/OrdinalNumber.h: * wtf/text/StringBuffer.h: * wtf/text/StringBuilder.h: * wtf/text/StringConcatenateNumbers.h: * wtf/text/StringHasher.h: * wtf/text/StringImpl.h: * wtf/text/StringView.cpp: * wtf/text/StringView.h: (WTF::StringView::left const): Deleted. (WTF::StringView::right const): Deleted. (WTF::StringView::underlyingStringIsValid const): Deleted. (WTF::StringView::setUnderlyingString): Deleted. * wtf/text/SymbolImpl.h: (WTF::SymbolImpl::StaticSymbolImpl::StaticSymbolImpl): Deleted. (WTF::SymbolImpl::StaticSymbolImpl::operator SymbolImpl&): Deleted. (WTF::PrivateSymbolImpl::PrivateSymbolImpl): Deleted. (WTF::RegisteredSymbolImpl::symbolRegistry const): Deleted. (WTF::RegisteredSymbolImpl::clearSymbolRegistry): Deleted. (WTF::RegisteredSymbolImpl::RegisteredSymbolImpl): Deleted. * wtf/text/SymbolRegistry.h: * wtf/text/TextBreakIterator.h: * wtf/text/TextPosition.h: * wtf/text/TextStream.h: * wtf/text/WTFString.h: (WTF::String::swap): Deleted. (WTF::String::adopt): Deleted. (WTF::String::isNull const): Deleted. (WTF::String::isEmpty const): Deleted. (WTF::String::impl const): Deleted. (WTF::String::releaseImpl): Deleted. (WTF::String::length const): Deleted. (WTF::String::characters8 const): Deleted. (WTF::String::characters16 const): Deleted. (WTF::String::is8Bit const): Deleted. (WTF::String::sizeInBytes const): Deleted. (WTF::String::operator[] const): Deleted. (WTF::String::find const): Deleted. (WTF::String::findIgnoringASCIICase const): Deleted. (WTF::String::reverseFind const): Deleted. (WTF::String::contains const): Deleted. (WTF::String::containsIgnoringASCIICase const): Deleted. (WTF::String::startsWith const): Deleted. (WTF::String::startsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixStartingAt const): Deleted. (WTF::String::endsWith const): Deleted. (WTF::String::endsWithIgnoringASCIICase const): Deleted. (WTF::String::hasInfixEndingAt const): Deleted. (WTF::String::append): Deleted. (WTF::String::left const): Deleted. (WTF::String::right const): Deleted. (WTF::String::createUninitialized): Deleted. (WTF::String::fromUTF8WithLatin1Fallback): Deleted. (WTF::String::isAllASCII const): Deleted. (WTF::String::isAllLatin1 const): Deleted. (WTF::String::isSpecialCharacter const): Deleted. (WTF::String::isHashTableDeletedValue const): Deleted. (WTF::String::hash const): Deleted. (WTF::String::existingHash const): Deleted. * wtf/text/cf/TextBreakIteratorCF.h: * wtf/text/icu/TextBreakIteratorICU.h: * wtf/text/icu/UTextProviderLatin1.h: * wtf/threads/BinarySemaphore.h: (WTF::BinarySemaphore::waitFor): Deleted. (WTF::BinarySemaphore::wait): Deleted. * wtf/unicode/Collator.h: * wtf/win/GDIObject.h: * wtf/win/PathWalker.h: * wtf/win/Win32Handle.h: Canonical link: https://commits.webkit.org/214396@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248546 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2019-08-12 20:57:15 +00:00
WTF_MAKE_FAST_ALLOCATED;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
public:
LiveAtHead(Liveness& liveness)
: m_liveness(liveness)
{
for (unsigned blockIndex = m_liveness.m_cfg.numNodes(); blockIndex--;) {
typename CFG::Node block = m_liveness.m_cfg.node(blockIndex);
if (!block)
continue;
std::sort(m_liveness.m_liveAtHead[block].begin(), m_liveness.m_liveAtHead[block].end());
}
}
bool isLiveAtHead(typename CFG::Node block, const typename Adapter::Thing& thing)
{
return !!tryBinarySearch<unsigned>(m_liveness.m_liveAtHead[block], m_liveness.m_liveAtHead[block].size(), m_liveness.valueToIndex(thing), [] (unsigned* value) { return *value; });
}
private:
Liveness& m_liveness;
};
LiveAtHead liveAtHead() { return LiveAtHead(*this); }
Don't need to Air::reportUsedRegisters for wasm at -O1 https://bugs.webkit.org/show_bug.cgi?id=170459 Reviewed by Saam Barati. Source/JavaScriptCore: I did some refactorings to Liveness<> to try to understand its performance. Based on this I concluded that the bigger immediate issue is just removing unnecessary phases from -O1. This removes Air::reportUsedRegisters() from -O1 if the user has indicated that he is not interested in StackmapGenerationParams::usedRegisters(). The logic here is a bit weird because of how Air does spill code generation. The register allocator's spiller will emit spill code using identifiable spill slots, which allows subsequent phases to register-allocate the spill slots. We do this by a forward flow CSE phase called fixObviousSpills (which is a terrible name since there is no longer anything obvious about some of the spills that this phase can fix!). As is most natural for CSEs over 3AC, it rewires the uses of redundant computations rather than removing the redundant computations. This means that if a spill got "fixed", there may be either or both of the following: - Dead loads from the stack. - Dead stores to the stack. We know that a load from the stack is dead if the register is dead at the point of the load. We know that a store to the stack is dead if the spill slot is dead at the point of the store. Unfortunately, liveness analysis - over either registers or spill slots - is expensive. Fortunately, allocateStack() already does liveness analysis over spill slots. So, we baked elimination of stores to the stack into that phase. That aspect of clean-up after the spill CSE comes for free. Also fortunately for the FTL, we have to do reportUsedRegisters() anyway. This is a phase that enables StackmapGenerationParams::usedRegisters() to work, which then enables the FTL's patchpoints to do crazy slow-path live range splitting. So, Air's strategy for the load fix-up after spill CSE is to do it as part of reportUsedRegisters(). This patch introduces the Procedure::setNeedsUsedRegisters() API. But if you set needsUsedRegisters to false then we will still run reportUsedRegisters() at -O2 as an optimization - it removes dead loads from the stack that are left behind from fixObviousSpills(). This is a ~6% compile time progression at -O1. * b3/B3Procedure.h: (JSC::B3::Procedure::setNeedsUsedRegisters): (JSC::B3::Procedure::needsUsedRegisters): * b3/B3StackmapGenerationParams.h: * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::needsUsedRegisters): * b3/air/AirCode.h: * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): Source/WTF: Just moved the liveness computation into a method, which enabled me to do the profiling that I used to write this patch. * wtf/Liveness.h: (WTF::Liveness::Liveness): (WTF::Liveness::compute): Canonical link: https://commits.webkit.org/187373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-04 19:09:03 +00:00
protected:
void compute()
{
Linear scan should run liveness only once https://bugs.webkit.org/show_bug.cgi?id=170569 Reviewed by Keith Miller. Source/JavaScriptCore: Air has a longstanding design bug that Tmps from different banks are indexed independently. This means that all of our analyses over Tmps do separate GP and FP passes. This does have some marginal benefits (the rest of the algorithm is specialized for Bank) but it's probably net bad. However, I don't want to think about solving that general problem. Instead, this just makes linear scan use a UnifiedTmpLiveness that uses a single "linear" indexing for GP and FP. This lets me avoid the much larger refactoring (which would involve substantial changes in graph coloring) while getting the bulk of the benefit (liveness runs once, instead of twice, for linear scan). This patch implements a lot of plumbing to make it possible for Liveness<> to view Tmps as having a unified indexing scheme. Tmp calls this LinearlyIndexed (to match the naming convention of AbsolutelyIndexed and Indexed), while AirLiveness calls this UnifiedTmpLiveness. With this change, -O1 never does any liveness analysis that uses separate GP and FP passes. I think this eliminates any urgency from the larger Tmp indexing bug. We can probably live with graph coloring doing separate passes. This is a ~6% speed-up for wasm -O1 compile times. I think this means that linear scan is no longer the longest pole in the tent. * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3VariableLiveness.h: (JSC::B3::VariableLivenessAdapter::prepareToCompute): * b3/air/AirAllocateRegistersByLinearScan.cpp: (JSC::B3::Air::allocateRegistersByLinearScan): * b3/air/AirCode.h: (JSC::B3::Air::Code::forEachTmp): * b3/air/AirLiveness.h: * b3/air/AirLivenessAdapter.h: (JSC::B3::Air::LivenessAdapter::Actions::Actions): (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::adapter): (JSC::B3::Air::LivenessAdapter::prepareToCompute): (JSC::B3::Air::LivenessAdapter::actionsAt): (JSC::B3::Air::LivenessAdapter::forEachUse): (JSC::B3::Air::LivenessAdapter::forEachDef): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::UnifiedTmpLivenessAdapter::UnifiedTmpLivenessAdapter): (JSC::B3::Air::UnifiedTmpLivenessAdapter::numIndices): (JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsBank): (JSC::B3::Air::UnifiedTmpLivenessAdapter::acceptsRole): (JSC::B3::Air::UnifiedTmpLivenessAdapter::valueToIndex): (JSC::B3::Air::UnifiedTmpLivenessAdapter::indexToValue): * b3/air/AirLivenessConstraints.h: Removed. * b3/air/AirRegLiveness.h: (JSC::B3::Air::RegLiveness::LocalCalc::LocalCalc): * b3/air/AirTmp.cpp: * b3/air/AirTmp.h: * b3/air/AirTmpInlines.h: (JSC::B3::Air::Tmp::LinearlyIndexed::LinearlyIndexed): (JSC::B3::Air::Tmp::LinearlyIndexed::index): (JSC::B3::Air::Tmp::linearlyIndexed): (JSC::B3::Air::Tmp::indexEnd): (JSC::B3::Air::Tmp::absoluteIndexEnd): (JSC::B3::Air::Tmp::linearIndexEnd): (JSC::B3::Air::Tmp::tmpForAbsoluteIndex): (JSC::B3::Air::Tmp::tmpForLinearIndex): * b3/air/AirTmpMap.h: Added. (JSC::B3::Air::TmpMap::TmpMap): (JSC::B3::Air::TmpMap::resize): (JSC::B3::Air::TmpMap::clear): (JSC::B3::Air::TmpMap::operator[]): (JSC::B3::Air::TmpMap::append): Source/WTF: Have Liveness<> call Adapter::prepareToCompute(), since this makes it a lot easier to implement constraint generation, since the constraint generator now gets to run after the Adapter is fully constructed. * wtf/IndexMap.h: (WTF::IndexMap::append): Also make this a bit more versatile. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::Iterable::contains): (WTF::Liveness::compute): Canonical link: https://commits.webkit.org/187500@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@215071 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-07 00:11:16 +00:00
Adapter::prepareToCompute();
Don't need to Air::reportUsedRegisters for wasm at -O1 https://bugs.webkit.org/show_bug.cgi?id=170459 Reviewed by Saam Barati. Source/JavaScriptCore: I did some refactorings to Liveness<> to try to understand its performance. Based on this I concluded that the bigger immediate issue is just removing unnecessary phases from -O1. This removes Air::reportUsedRegisters() from -O1 if the user has indicated that he is not interested in StackmapGenerationParams::usedRegisters(). The logic here is a bit weird because of how Air does spill code generation. The register allocator's spiller will emit spill code using identifiable spill slots, which allows subsequent phases to register-allocate the spill slots. We do this by a forward flow CSE phase called fixObviousSpills (which is a terrible name since there is no longer anything obvious about some of the spills that this phase can fix!). As is most natural for CSEs over 3AC, it rewires the uses of redundant computations rather than removing the redundant computations. This means that if a spill got "fixed", there may be either or both of the following: - Dead loads from the stack. - Dead stores to the stack. We know that a load from the stack is dead if the register is dead at the point of the load. We know that a store to the stack is dead if the spill slot is dead at the point of the store. Unfortunately, liveness analysis - over either registers or spill slots - is expensive. Fortunately, allocateStack() already does liveness analysis over spill slots. So, we baked elimination of stores to the stack into that phase. That aspect of clean-up after the spill CSE comes for free. Also fortunately for the FTL, we have to do reportUsedRegisters() anyway. This is a phase that enables StackmapGenerationParams::usedRegisters() to work, which then enables the FTL's patchpoints to do crazy slow-path live range splitting. So, Air's strategy for the load fix-up after spill CSE is to do it as part of reportUsedRegisters(). This patch introduces the Procedure::setNeedsUsedRegisters() API. But if you set needsUsedRegisters to false then we will still run reportUsedRegisters() at -O2 as an optimization - it removes dead loads from the stack that are left behind from fixObviousSpills(). This is a ~6% compile time progression at -O1. * b3/B3Procedure.h: (JSC::B3::Procedure::setNeedsUsedRegisters): (JSC::B3::Procedure::needsUsedRegisters): * b3/B3StackmapGenerationParams.h: * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::needsUsedRegisters): * b3/air/AirCode.h: * b3/air/AirGenerate.cpp: (JSC::B3::Air::prepareForGeneration): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * wasm/WasmB3IRGenerator.cpp: (JSC::Wasm::parseAndCompile): Source/WTF: Just moved the liveness computation into a method, which enabled me to do the profiling that I used to write this patch. * wtf/Liveness.h: (WTF::Liveness::Liveness): (WTF::Liveness::compute): Canonical link: https://commits.webkit.org/187373@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214887 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-04 19:09:03 +00:00
// The liveAtTail of each block automatically contains the LateUse's of the terminal.
for (unsigned blockIndex = m_cfg.numNodes(); blockIndex--;) {
typename CFG::Node block = m_cfg.node(blockIndex);
if (!block)
continue;
IndexVector& liveAtTail = m_liveAtTail[block];
Adapter::forEachUse(
block, Adapter::blockSize(block),
[&] (unsigned index) {
liveAtTail.append(index);
});
std::sort(liveAtTail.begin(), liveAtTail.end());
removeRepeatedElements(liveAtTail);
}
// Blocks with new live values at tail.
BitVector dirtyBlocks;
for (size_t blockIndex = m_cfg.numNodes(); blockIndex--;)
dirtyBlocks.set(blockIndex);
IndexVector mergeBuffer;
bool changed;
do {
changed = false;
for (size_t blockIndex = m_cfg.numNodes(); blockIndex--;) {
typename CFG::Node block = m_cfg.node(blockIndex);
if (!block)
continue;
if (!dirtyBlocks.quickClear(blockIndex))
continue;
LocalCalc localCalc(*this, block);
for (size_t instIndex = Adapter::blockSize(block); instIndex--;)
localCalc.execute(instIndex);
// Handle the early def's of the first instruction.
Adapter::forEachDef(
block, 0,
[&] (unsigned index) {
m_workset.remove(index);
});
IndexVector& liveAtHead = m_liveAtHead[block];
// We only care about Tmps that were discovered in this iteration. It is impossible
// to remove a live value from the head.
// We remove all the values we already knew about so that we only have to deal with
// what is new in LiveAtHead.
if (m_workset.size() == liveAtHead.size())
m_workset.clear();
else {
for (unsigned liveIndexAtHead : liveAtHead)
m_workset.remove(liveIndexAtHead);
}
if (m_workset.isEmpty())
continue;
liveAtHead.reserveCapacity(liveAtHead.size() + m_workset.size());
for (unsigned newValue : m_workset)
liveAtHead.uncheckedAppend(newValue);
m_workset.sort();
for (typename CFG::Node predecessor : m_cfg.predecessors(block)) {
IndexVector& liveAtTail = m_liveAtTail[predecessor];
if (liveAtTail.isEmpty())
liveAtTail = m_workset.values();
else {
mergeBuffer.resize(liveAtTail.size() + m_workset.size());
auto iter = mergeDeduplicatedSorted(
liveAtTail.begin(), liveAtTail.end(),
m_workset.begin(), m_workset.end(),
mergeBuffer.begin());
mergeBuffer.resize(iter - mergeBuffer.begin());
if (mergeBuffer.size() == liveAtTail.size())
continue;
RELEASE_ASSERT(mergeBuffer.size() > liveAtTail.size());
liveAtTail = mergeBuffer;
}
dirtyBlocks.quickSet(predecessor->index());
changed = true;
}
}
} while (changed);
}
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
private:
friend class LocalCalc;
friend class LocalCalc::Iterable;
CFG& m_cfg;
B3::fixSSA() needs a tune-up https://bugs.webkit.org/show_bug.cgi?id=170485 Reviewed by Saam Barati. Source/JavaScriptCore: After the various optimizations to liveness, register allocation, and other phases, the fixSSA() phase now looks like one of the top offenders. This includes a bunch of changes to make this phase run faster. This is a ~7% wasm -O1 compile time progression. Here's what I did: - We now use IndexSparseSet instead of IndexMap for tracking variable values. This makes it cheaper to chew through small blocks while there is a non-trivial number of total variables. - We now do a "local SSA conversion" pass before anything else. This eliminates obvious Get's. If we were using temporary Variables, it would eliminate many of those. That's useful for when we use demoteValues() and duplciateTails(). For wasm -O1, we mainly care about the fact that it makes a bunch of Set's dead. - We now do a Set DCE pass after the local SSA but before SSA conversion. This ensures that any block-local live intervals of Variables disappear and don't need further consideration. - We now cache the reaching defs calculation. - We now perform the reaching defs calculation lazily. * b3/B3FixSSA.cpp: (JSC::B3::demoteValues): (JSC::B3::fixSSA): * b3/B3SSACalculator.cpp: (JSC::B3::SSACalculator::reachingDefAtTail): * b3/B3VariableLiveness.cpp: (JSC::B3::VariableLiveness::VariableLiveness): * b3/air/AirLiveness.h: (JSC::B3::Air::Liveness::Liveness): * dfg/DFGLivenessAnalysisPhase.cpp: (JSC::DFG::LivenessAnalysisPhase::LivenessAnalysisPhase): Deleted. (JSC::DFG::LivenessAnalysisPhase::run): Deleted. (JSC::DFG::LivenessAnalysisPhase::processBlock): Deleted. Source/WTF: This makes IndexSparseSet capable of being used as a map if you instantiate it with KeyValuePair<unsigned, ValueType>. * wtf/HashTraits.h: * wtf/IndexSparseSet.h: (WTF::DefaultIndexSparseSetTraits::create): (WTF::DefaultIndexSparseSetTraits::key): (WTF::OverflowHandler>::IndexSparseSet): (WTF::OverflowHandler>::add): (WTF::OverflowHandler>::set): (WTF::OverflowHandler>::remove): (WTF::OverflowHandler>::clear): (WTF::OverflowHandler>::size): (WTF::OverflowHandler>::isEmpty): (WTF::OverflowHandler>::contains): (WTF::OverflowHandler>::sort): (WTF::IndexSparseSet<OverflowHandler>::IndexSparseSet): Deleted. (WTF::IndexSparseSet<OverflowHandler>::add): Deleted. (WTF::IndexSparseSet<OverflowHandler>::remove): Deleted. (WTF::IndexSparseSet<OverflowHandler>::clear): Deleted. (WTF::IndexSparseSet<OverflowHandler>::size): Deleted. (WTF::IndexSparseSet<OverflowHandler>::isEmpty): Deleted. (WTF::IndexSparseSet<OverflowHandler>::contains): Deleted. (WTF::IndexSparseSet<OverflowHandler>::sort): Deleted. * wtf/Liveness.h: (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::workset): Canonical link: https://commits.webkit.org/187401@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214917 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-04-05 00:25:02 +00:00
Workset m_workset;
B3::fixSSA should do liveness pruning https://bugs.webkit.org/show_bug.cgi?id=170111 Reviewed by Saam Barati. Source/JavaScriptCore: This moves all of the logic of Air::Liveness<> to WTF::Liveness<> and then uses that to create B3::VariableLiveness. Then this uses VariableLiveness::LiveAtHead to prune Phi construction. This makes B3::fixSSA run twice as fast. This is a 13% progression on WasmBench compile times. * CMakeLists.txt: * JavaScriptCore.xcodeproj/project.pbxproj: * b3/B3BasicBlock.h: (JSC::B3::BasicBlock::get): * b3/B3FixSSA.cpp: (JSC::B3::fixSSA): * b3/B3VariableLiveness.cpp: Added. (JSC::B3::VariableLiveness::VariableLiveness): (JSC::B3::VariableLiveness::~VariableLiveness): * b3/B3VariableLiveness.h: Added. (JSC::B3::VariableLivenessAdapter::VariableLivenessAdapter): (JSC::B3::VariableLivenessAdapter::numIndices): (JSC::B3::VariableLivenessAdapter::valueToIndex): (JSC::B3::VariableLivenessAdapter::indexToValue): (JSC::B3::VariableLivenessAdapter::blockSize): (JSC::B3::VariableLivenessAdapter::forEachEarlyUse): (JSC::B3::VariableLivenessAdapter::forEachLateUse): (JSC::B3::VariableLivenessAdapter::forEachEarlyDef): (JSC::B3::VariableLivenessAdapter::forEachLateDef): * b3/air/AirCFG.h: Added. (JSC::B3::Air::CFG::CFG): (JSC::B3::Air::CFG::root): (JSC::B3::Air::CFG::newMap): (JSC::B3::Air::CFG::successors): (JSC::B3::Air::CFG::predecessors): (JSC::B3::Air::CFG::index): (JSC::B3::Air::CFG::node): (JSC::B3::Air::CFG::numNodes): (JSC::B3::Air::CFG::dump): * b3/air/AirCode.cpp: (JSC::B3::Air::Code::Code): * b3/air/AirCode.h: (JSC::B3::Air::Code::cfg): * b3/air/AirLiveness.h: (JSC::B3::Air::LivenessAdapter::LivenessAdapter): (JSC::B3::Air::LivenessAdapter::blockSize): (JSC::B3::Air::LivenessAdapter::forEachEarlyUse): (JSC::B3::Air::LivenessAdapter::forEachLateUse): (JSC::B3::Air::LivenessAdapter::forEachEarlyDef): (JSC::B3::Air::LivenessAdapter::forEachLateDef): (JSC::B3::Air::TmpLivenessAdapter::TmpLivenessAdapter): (JSC::B3::Air::TmpLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::StackSlotLivenessAdapter): (JSC::B3::Air::StackSlotLivenessAdapter::numIndices): (JSC::B3::Air::StackSlotLivenessAdapter::indexToValue): (JSC::B3::Air::Liveness::Liveness): (JSC::B3::Air::Liveness::LocalCalc::LocalCalc): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::end): Deleted. (JSC::B3::Air::Liveness::LocalCalc::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::LocalCalc::live): Deleted. (JSC::B3::Air::Liveness::LocalCalc::isLive): Deleted. (JSC::B3::Air::Liveness::LocalCalc::execute): Deleted. (JSC::B3::Air::Liveness::rawLiveAtHead): Deleted. (JSC::B3::Air::Liveness::Iterable::Iterable): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::iterator): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator*): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator++): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator==): Deleted. (JSC::B3::Air::Liveness::Iterable::iterator::operator!=): Deleted. (JSC::B3::Air::Liveness::Iterable::begin): Deleted. (JSC::B3::Air::Liveness::Iterable::end): Deleted. (JSC::B3::Air::Liveness::Iterable::contains): Deleted. (JSC::B3::Air::Liveness::liveAtHead): Deleted. (JSC::B3::Air::Liveness::liveAtTail): Deleted. (JSC::B3::Air::Liveness::workset): Deleted. Source/WTF: Move Air::Liveness<> to WTF::Liveness<>. This is pretty easy since Air::Liveness<> was already fairly generic. It leverages the CFG concept so that it can understand many different kinds of basic blocks. It doesn't try to understand the contents of basic blocks; it just asks the adaptor for the block size and asks for the early/late uses/defs of each thing in the block. This makes it easy to create a B3::VariableLiveness, which fixSSA then uses for pruning. One of the new features is the Liveness::LiveAtHead nested class, which you instantiate if you want to perform liveAtHead queries, which SSA construction wants to do. This also fixes https://bugs.webkit.org/show_bug.cgi?id=170102#c12 * WTF.xcodeproj/project.pbxproj: * wtf/CMakeLists.txt: * wtf/Liveness.h: Added. (WTF::Liveness::Liveness): (WTF::Liveness::LocalCalc::LocalCalc): (WTF::Liveness::LocalCalc::Iterable::Iterable): (WTF::Liveness::LocalCalc::Iterable::iterator::iterator): (WTF::Liveness::LocalCalc::Iterable::iterator::operator++): (WTF::Liveness::LocalCalc::Iterable::iterator::operator*): (WTF::Liveness::LocalCalc::Iterable::iterator::operator==): (WTF::Liveness::LocalCalc::Iterable::iterator::operator!=): (WTF::Liveness::LocalCalc::Iterable::begin): (WTF::Liveness::LocalCalc::Iterable::end): (WTF::Liveness::LocalCalc::Iterable::contains): (WTF::Liveness::LocalCalc::live): (WTF::Liveness::LocalCalc::isLive): (WTF::Liveness::LocalCalc::execute): (WTF::Liveness::rawLiveAtHead): (WTF::Liveness::Iterable::Iterable): (WTF::Liveness::Iterable::iterator::iterator): (WTF::Liveness::Iterable::iterator::operator*): (WTF::Liveness::Iterable::iterator::operator++): (WTF::Liveness::Iterable::iterator::operator==): (WTF::Liveness::Iterable::iterator::operator!=): (WTF::Liveness::Iterable::begin): (WTF::Liveness::Iterable::end): (WTF::Liveness::Iterable::contains): (WTF::Liveness::liveAtHead): (WTF::Liveness::liveAtTail): (WTF::Liveness::workset): (WTF::Liveness::LiveAtHead::LiveAtHead): (WTF::Liveness::LiveAtHead::isLiveAtHead): Canonical link: https://commits.webkit.org/187035@main git-svn-id: https://svn.webkit.org/repository/webkit/trunk@214410 268f45cc-cd09-0410-ab3c-d52691b4dbfc
2017-03-27 04:17:52 +00:00
typename CFG::template Map<IndexVector> m_liveAtHead;
typename CFG::template Map<IndexVector> m_liveAtTail;
};
} // namespace WTF