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

Unified Diff: runtime/vm/flow_graph.cc

Issue 3003593002: [vm] Cleanup Instruction::Effects(), prepare to cleanup Dependencies() (Closed)
Patch Set: Address review comment Created 3 years, 4 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/constant_propagator.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('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 ddbcc2652648c668e6f33785b73c5ab7ac547960..3d36bb71d84b1fa5bef85dbb9f7e2b04a9325433 100644
--- a/runtime/vm/flow_graph.cc
+++ b/runtime/vm/flow_graph.cc
@@ -1442,7 +1442,7 @@ BlockEffects::BlockEffects(FlowGraph* flow_graph)
BlockEntryInstr* block = it.Current();
for (ForwardInstructionIterator it(block); !it.Done(); it.Advance()) {
- if (!it.Current()->Effects().IsNone()) {
+ if (it.Current()->HasUnknownSideEffects()) {
kill->Add(block->postorder_number());
break;
}
@@ -1500,14 +1500,16 @@ BlockEffects::BlockEffects(FlowGraph* flow_graph)
bool BlockEffects::IsAvailableAt(Instruction* instr,
BlockEntryInstr* block) const {
- return (instr->Dependencies().IsNone()) ||
- IsSideEffectFreePath(instr->GetBlock(), block);
+ ASSERT(instr->AllowsCSE());
+ ASSERT(instr->Dependencies().IsNone());
+ return true; // TODO(dartbug.com/30474): cleanup
}
bool BlockEffects::CanBeMovedTo(Instruction* instr,
BlockEntryInstr* block) const {
- return (instr->Dependencies().IsNone()) ||
- IsSideEffectFreePath(block, instr->GetBlock());
+ ASSERT(instr->AllowsCSE());
+ ASSERT(instr->Dependencies().IsNone());
+ return true; // TODO(dartbug.com/30474): cleanup
}
bool BlockEffects::IsSideEffectFreePath(BlockEntryInstr* from,
« no previous file with comments | « runtime/vm/constant_propagator.cc ('k') | runtime/vm/flow_graph_type_propagator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698