Ignore:
Timestamp:
Oct 2, 2014, 12:38:08 PM (11 years ago)
Author:
[email protected]
Message:

Object allocation sinking should have a sound story for picking materialization points
https://bugs.webkit.org/show_bug.cgi?id=137315

Reviewed by Oliver Hunt.

The only missing piece was having the object allocation sinking phase locate materialization
points that were at CFG edges.

The logic for how and why this "just works" relies on some properties of critical edge
breaking, so I was fairly careful in how I did this. Also, this requires inserting things at
the "first origin node" of a block - that is the first node in a block that has a NodeOrigin
and therefore is allowed to exit. We basically had support for such a notion before, but
didn't close the loop on it; this patch does that.

Also I added the ability to provide a BasicBlock* as context for a DFG_ASSERT().

  • dfg/DFGBasicBlock.cpp:

(JSC::DFG::BasicBlock::firstOriginNode):
(JSC::DFG::BasicBlock::firstOrigin):

  • dfg/DFGBasicBlock.h:
  • dfg/DFGCriticalEdgeBreakingPhase.cpp:

(JSC::DFG::CriticalEdgeBreakingPhase::breakCriticalEdge):

  • dfg/DFGGraph.cpp:

(JSC::DFG::crash):
(JSC::DFG::Graph::handleAssertionFailure):

  • dfg/DFGGraph.h:
  • dfg/DFGLoopPreHeaderCreationPhase.cpp:

(JSC::DFG::createPreHeader):

  • dfg/DFGNodeOrigin.h:

(JSC::DFG::NodeOrigin::isSet):

  • dfg/DFGObjectAllocationSinkingPhase.cpp:

(JSC::DFG::ObjectAllocationSinkingPhase::determineMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::placeMaterializationPoints):
(JSC::DFG::ObjectAllocationSinkingPhase::promoteSunkenFields):
(JSC::DFG::ObjectAllocationSinkingPhase::createMaterialize):

  • dfg/DFGValidate.cpp:

(JSC::DFG::Validate::validate):

  • runtime/Options.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp

    r173993 r174224  
    214214                    VALIDATE((node), canonicalResultRepresentation(node->result()) == canonicalResultRepresentation(node->child1()->result()));
    215215                    break;
     216                case SetLocal:
     217                case PutLocal:
     218                case Upsilon:
     219                    VALIDATE((node), !!node->child1());
     220                    switch (node->child1().useKind()) {
     221                    case UntypedUse:
     222                    case CellUse:
     223                    case Int32Use:
     224                    case Int52RepUse:
     225                    case DoubleRepUse:
     226                    case BooleanUse:
     227                        break;
     228                    default:
     229                        VALIDATE((node), !"Bad use kind");
     230                        break;
     231                    }
     232                    break;
    216233                case MakeRope:
    217234                case ValueAdd:
Note: See TracChangeset for help on using the changeset viewer.