| 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,
|
|
|