Rubber stamped by Geoffrey Garen.
We are steadily moving towards Phantom just being a backend hack in the DFG. HardPhantom
is more than that; it's a utility for forcing the execution of otherwise killable nodes.
NodeMustGenerate is the flag we use to indicate that something isn't killable. So this
node should just be called MustGenerate.
* dfg/DFGAbstractInterpreterInlines.h:
(JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
* dfg/DFGArgumentsEliminationPhase.cpp:
* dfg/DFGClobberize.h:
(JSC::DFG::clobberize):
* dfg/DFGDCEPhase.cpp:
(JSC::DFG::DCEPhase::run):
* dfg/DFGDoesGC.cpp:
(JSC::DFG::doesGC):
* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::tryToRelaxRepresentation):
* dfg/DFGIntegerCheckCombiningPhase.cpp:
(JSC::DFG::IntegerCheckCombiningPhase::insertMustAdd):
* dfg/DFGMayExit.cpp:
(JSC::DFG::mayExit):
* dfg/DFGNode.h:
(JSC::DFG::Node::willHaveCodeGenOrOSR):
* dfg/DFGNodeType.h:
* dfg/DFGObjectAllocationSinkingPhase.cpp:
(JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
* dfg/DFGPhantomCanonicalizationPhase.cpp:
(JSC::DFG::PhantomCanonicalizationPhase::run):
* dfg/DFGPhantomRemovalPhase.cpp:
(JSC::DFG::PhantomRemovalPhase::run):
* dfg/DFGPredictionPropagationPhase.cpp:
(JSC::DFG::PredictionPropagationPhase::propagate):
* dfg/DFGSafeToExecute.h:
(JSC::DFG::safeToExecute):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* dfg/DFGVarargsForwardingPhase.cpp:
* ftl/FTLCapabilities.cpp:
(JSC::FTL::canCompile):
* ftl/FTLLowerDFGToLLVM.cpp:
(JSC::FTL::LowerDFGToLLVM::compileNode):
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@183201
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2015-04-23 Filip Pizlo <fpizlo@apple.com>
+
+ Rename HardPhantom to MustGenerate.
+
+ Rubber stamped by Geoffrey Garen.
+
+ We are steadily moving towards Phantom just being a backend hack in the DFG. HardPhantom
+ is more than that; it's a utility for forcing the execution of otherwise killable nodes.
+ NodeMustGenerate is the flag we use to indicate that something isn't killable. So this
+ node should just be called MustGenerate.
+
+ * dfg/DFGAbstractInterpreterInlines.h:
+ (JSC::DFG::AbstractInterpreter<AbstractStateType>::executeEffects):
+ * dfg/DFGArgumentsEliminationPhase.cpp:
+ * dfg/DFGClobberize.h:
+ (JSC::DFG::clobberize):
+ * dfg/DFGDCEPhase.cpp:
+ (JSC::DFG::DCEPhase::run):
+ * dfg/DFGDoesGC.cpp:
+ (JSC::DFG::doesGC):
+ * dfg/DFGFixupPhase.cpp:
+ (JSC::DFG::FixupPhase::fixupNode):
+ (JSC::DFG::FixupPhase::tryToRelaxRepresentation):
+ * dfg/DFGIntegerCheckCombiningPhase.cpp:
+ (JSC::DFG::IntegerCheckCombiningPhase::insertMustAdd):
+ * dfg/DFGMayExit.cpp:
+ (JSC::DFG::mayExit):
+ * dfg/DFGNode.h:
+ (JSC::DFG::Node::willHaveCodeGenOrOSR):
+ * dfg/DFGNodeType.h:
+ * dfg/DFGObjectAllocationSinkingPhase.cpp:
+ (JSC::DFG::ObjectAllocationSinkingPhase::handleNode):
+ * dfg/DFGPhantomCanonicalizationPhase.cpp:
+ (JSC::DFG::PhantomCanonicalizationPhase::run):
+ * dfg/DFGPhantomRemovalPhase.cpp:
+ (JSC::DFG::PhantomRemovalPhase::run):
+ * dfg/DFGPredictionPropagationPhase.cpp:
+ (JSC::DFG::PredictionPropagationPhase::propagate):
+ * dfg/DFGSafeToExecute.h:
+ (JSC::DFG::safeToExecute):
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGTypeCheckHoistingPhase.cpp:
+ (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
+ (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
+ * dfg/DFGVarargsForwardingPhase.cpp:
+ * ftl/FTLCapabilities.cpp:
+ (JSC::FTL::canCompile):
+ * ftl/FTLLowerDFGToLLVM.cpp:
+ (JSC::FTL::LowerDFGToLLVM::compileNode):
+
2015-04-23 Jordan Harband <ljharb@gmail.com>
Implement `Object.assign`
case ProfileType:
case ProfileControlFlow:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case CountExecution:
case CheckTierUpInLoop:
case CheckTierUpAtReturn:
case Phantom:
case Check:
- case HardPhantom:
+ case MustGenerate:
case MovHint:
case PutHint:
break;
case Identity:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Check:
case ExtractOSREntryLocal:
case CheckStructureImmediate:
cleanVariables(m_graph.m_arguments);
}
- // Just do a basic HardPhantom/Phantom/Check clean-up.
+ // Just do a basic MustGenerate/Phantom/Check clean-up.
for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
BasicBlock* block = m_graph.block(blockIndex);
if (!block)
Node* node = block->at(sourceIndex++);
switch (node->op()) {
case Check:
- case HardPhantom:
+ case MustGenerate:
case Phantom:
if (node->children.isEmpty())
continue;
case MovHint:
case ZombieHint:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Upsilon:
case Phi:
case Flush:
case ConstantStoragePointer:
case DoubleAsInt32:
case ValueToInt32:
- case HardPhantom: // HardPhantom would be trivial to handle but anyway we assert that we won't see it here yet.
+ case MustGenerate: // MustGenerate would be trivial to handle but anyway we assert that we won't see it here yet.
case DoubleRep:
case ValueRep:
case Int52Rep:
case MovHint:
case Phantom:
case Check:
- case HardPhantom:
+ case MustGenerate:
DFG_NODE_DO_TO_CHILDREN(m_graph, m_currentNode, fixEdgeRepresentation);
break;
{
Node* result = insertAdd(nodeIndex, origin, source, addend);
m_insertionSet.insertNode(
- nodeIndex, SpecNone, HardPhantom, origin, result->defaultEdge());
+ nodeIndex, SpecNone, MustGenerate, origin, result->defaultEdge());
return result;
}
case Flush:
case Phantom:
case Check:
- case HardPhantom:
+ case MustGenerate:
case GetLocal:
case LoopHint:
case Phi:
case ZombieHint:
return true;
case Phantom:
- case HardPhantom:
+ case MustGenerate:
return child1().useKindUnchecked() != UntypedUse || child2().useKindUnchecked() != UntypedUse || child3().useKindUnchecked() != UntypedUse;
default:
return shouldGenerate();
macro(MovHint, NodeMustGenerate) \
macro(ZombieHint, NodeMustGenerate) \
macro(Phantom, NodeMustGenerate) \
- macro(HardPhantom, NodeMustGenerate) /* Like Phantom, but we never remove any of its children. */ \
+ macro(MustGenerate, NodeMustGenerate) /* Utility node for making soem not-usually-NodeMustGenerate node become like NodeMustGenerate. */ \
macro(Check, NodeMustGenerate) /* Used if we want just a type check but not liveness. Non-checking uses will be removed. */\
macro(Upsilon, NodeRelevantToOSR) \
macro(Phi, NodeRelevantToOSR) \
case MovHint:
case Phantom:
case Check:
- case HardPhantom:
+ case MustGenerate:
case StoreBarrier:
case StoreBarrierWithNullCheck:
case PutHint:
namespace JSC { namespace DFG {
static const NodeFlags NodeNeedsPhantom = NodeMiscFlag1;
-static const NodeFlags NodeNeedsHardPhantom = NodeMiscFlag2;
+static const NodeFlags NodeNeedsMustGenerate = NodeMiscFlag2;
class PhantomCanonicalizationPhase : public Phase {
public:
{
ASSERT(m_graph.m_form == SSA);
- m_graph.clearFlagsOnAllNodes(NodeNeedsPhantom | NodeNeedsHardPhantom | NodeRelevantToOSR);
+ m_graph.clearFlagsOnAllNodes(NodeNeedsPhantom | NodeNeedsMustGenerate | NodeRelevantToOSR);
m_graph.mergeRelevantToOSR();
for (BlockIndex blockIndex = m_graph.numBlocks(); blockIndex--;) {
unsigned targetIndex = 0;
while (sourceIndex < block->size()) {
Node* node = block->at(sourceIndex++);
- if (node->op() == HardPhantom || node->op() == Phantom || node->op() == Check) {
+ if (node->op() == MustGenerate || node->op() == Phantom || node->op() == Check) {
for (unsigned i = 0; i < AdjacencyList::Size; ++i) {
Edge edge = node->children.child(i);
if (!edge)
break;
- if (node->op() == HardPhantom)
- edge->mergeFlags(NodeNeedsHardPhantom);
+ if (node->op() == MustGenerate)
+ edge->mergeFlags(NodeNeedsMustGenerate);
if ((edge->flags() & NodeRelevantToOSR) && node->op() == Phantom) {
// A Phantom on a node that is RelevantToOSR means that we need to keep
// a Phantom on this node instead of just having a Check.
for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
Node* node = block->at(nodeIndex);
- if (node->flags() & NodeNeedsHardPhantom) {
+ if (node->flags() & NodeNeedsMustGenerate) {
insertionSet.insertNode(
- nodeIndex + 1, SpecNone, HardPhantom, node->origin, node->defaultEdge());
+ nodeIndex + 1, SpecNone, MustGenerate, node->origin, node->defaultEdge());
} else if (node->flags() & NodeNeedsPhantom) {
insertionSet.insertNode(
nodeIndex + 1, SpecNone, Phantom, node->origin, node->defaultEdge());
break;
}
- case HardPhantom: {
+ case MustGenerate: {
if (node->children.isEmpty()) {
m_graph.m_allocator.free(node);
continue;
case InvalidationPoint:
case CheckInBounds:
case ValueToInt32:
- case HardPhantom:
+ case MustGenerate:
case DoubleRep:
case ValueRep:
case Int52Rep:
case MovHint:
case ZombieHint:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Upsilon:
case Phi:
case Flush:
break;
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Check:
DFG_NODE_DO_TO_CHILDREN(m_jit.graph(), node, speculate);
noResult(node);
break;
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Check:
DFG_NODE_DO_TO_CHILDREN(m_jit.graph(), node, speculate);
noResult(node);
case GetIndexedPropertyStorage:
case GetTypedArrayByteOffset:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case MovHint:
case MultiGetByOffset:
case MultiPutByOffset:
case GetArrayLength:
case GetIndexedPropertyStorage:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case MovHint:
case MultiGetByOffset:
case MultiPutByOffset:
switch (node->op()) {
case Phantom:
case Check:
- case HardPhantom:
+ case MustGenerate:
case MovHint:
case PutHint:
case LoadVarargs:
switch (node->op()) {
case Phantom:
case Check:
- case HardPhantom:
+ case MustGenerate:
case MovHint:
case PutHint:
// We don't need to change anything with these.
case MovHint:
case ZombieHint:
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Flush:
case PhantomLocal:
case SetArgument:
compilePutStack();
break;
case Phantom:
- case HardPhantom:
+ case MustGenerate:
case Check:
compilePhantom();
break;