Only do a full verify after computing dominators.
We don't modify the graph in later phases. This speeds up debug tests by a lot. Review URL: http://codereview.chromium.org/7942001 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9325 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
cf63503cad
commit
b77a69f22c
@ -422,7 +422,7 @@ class ReachabilityAnalyzer BASE_EMBEDDED {
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
void HGraph::Verify() const {
|
void HGraph::Verify(bool do_full_verify) const {
|
||||||
for (int i = 0; i < blocks_.length(); i++) {
|
for (int i = 0; i < blocks_.length(); i++) {
|
||||||
HBasicBlock* block = blocks_.at(i);
|
HBasicBlock* block = blocks_.at(i);
|
||||||
|
|
||||||
@ -473,6 +473,7 @@ void HGraph::Verify() const {
|
|||||||
// Check special property of first block to have no predecessors.
|
// Check special property of first block to have no predecessors.
|
||||||
ASSERT(blocks_.at(0)->predecessors()->is_empty());
|
ASSERT(blocks_.at(0)->predecessors()->is_empty());
|
||||||
|
|
||||||
|
if (do_full_verify) {
|
||||||
// Check that the graph is fully connected.
|
// Check that the graph is fully connected.
|
||||||
ReachabilityAnalyzer analyzer(entry_block_, blocks_.length(), NULL);
|
ReachabilityAnalyzer analyzer(entry_block_, blocks_.length(), NULL);
|
||||||
ASSERT(analyzer.visited_count() == blocks_.length());
|
ASSERT(analyzer.visited_count() == blocks_.length());
|
||||||
@ -495,6 +496,7 @@ void HGraph::Verify() const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -2320,6 +2322,12 @@ HGraph* HGraphBuilder::CreateGraph() {
|
|||||||
|
|
||||||
graph()->OrderBlocks();
|
graph()->OrderBlocks();
|
||||||
graph()->AssignDominators();
|
graph()->AssignDominators();
|
||||||
|
|
||||||
|
#ifdef DEBUG
|
||||||
|
// Do a full verify after building the graph and computing dominators.
|
||||||
|
graph()->Verify(true);
|
||||||
|
#endif
|
||||||
|
|
||||||
graph()->PropagateDeoptimizingMark();
|
graph()->PropagateDeoptimizingMark();
|
||||||
graph()->EliminateRedundantPhis();
|
graph()->EliminateRedundantPhis();
|
||||||
if (!graph()->CheckPhis()) {
|
if (!graph()->CheckPhis()) {
|
||||||
@ -6820,7 +6828,7 @@ void HPhase::End() const {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
if (graph_ != NULL) graph_->Verify();
|
if (graph_ != NULL) graph_->Verify(false); // No full verify.
|
||||||
if (allocator_ != NULL) allocator_->Verify();
|
if (allocator_ != NULL) allocator_->Verify();
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
@ -283,7 +283,7 @@ class HGraph: public ZoneObject {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
void Verify() const;
|
void Verify(bool do_full_verify) const;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
Reference in New Issue
Block a user