Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(305)

Unified Diff: runtime/vm/flow_graph.cc

Issue 13910003: Revert "Incrementally recompute dominators when inlining." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph.cc
diff --git a/runtime/vm/flow_graph.cc b/runtime/vm/flow_graph.cc
index c68f7208bd75baadca7297d8463c75066698a33d..ec35849642c05b8935b37f2b77c6e03b7413aba2 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -29,7 +29,8 @@ FlowGraph::FlowGraph(const FlowGraphBuilder& builder,
graph_entry_(graph_entry),
preorder_(),
postorder_(),
- reverse_postorder_() {
+ reverse_postorder_(),
+ invalid_dominator_tree_(true) {
DiscoverBlocks();
}
@@ -230,6 +231,7 @@ void FlowGraph::ComputeSSA(intptr_t next_virtual_register_number,
// (preorder block numbers of) blocks in the dominance frontier.
void FlowGraph::ComputeDominators(
GrowableArray<BitVector*>* dominance_frontier) {
+ invalid_dominator_tree_ = false;
// Use the SEMI-NCA algorithm to compute dominators. This is a two-pass
// version of the Lengauer-Tarjan algorithm (LT is normally three passes)
// that eliminates a pass by using nearest-common ancestor (NCA) to
@@ -671,6 +673,15 @@ void FlowGraph::Bailout(const char* reason) const {
}
+void FlowGraph::RepairGraphAfterInlining() {
+ DiscoverBlocks();
+ if (invalid_dominator_tree_) {
+ GrowableArray<BitVector*> dominance_frontier;
+ ComputeDominators(&dominance_frontier);
+ }
+}
+
+
intptr_t FlowGraph::InstructionCount() const {
intptr_t size = 0;
// Iterate each block, skipping the graph entry.
« no previous file with comments | « runtime/vm/flow_graph.h ('k') | runtime/vm/flow_graph_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698