OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/constant_propagator.h" | 5 #include "vm/constant_propagator.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/flow_graph_builder.h" | 8 #include "vm/flow_graph_builder.h" |
9 #include "vm/flow_graph_compiler.h" | 9 #include "vm/flow_graph_compiler.h" |
10 #include "vm/flow_graph_range_analysis.h" | 10 #include "vm/flow_graph_range_analysis.h" |
(...skipping 1101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1112 } | 1112 } |
1113 | 1113 |
1114 | 1114 |
1115 void ConstantPropagator::VisitInvokeMathCFunction( | 1115 void ConstantPropagator::VisitInvokeMathCFunction( |
1116 InvokeMathCFunctionInstr* instr) { | 1116 InvokeMathCFunctionInstr* instr) { |
1117 // TODO(kmillikin): Handle conversion. | 1117 // TODO(kmillikin): Handle conversion. |
1118 SetValue(instr, non_constant_); | 1118 SetValue(instr, non_constant_); |
1119 } | 1119 } |
1120 | 1120 |
1121 | 1121 |
1122 void ConstantPropagator::VisitMergedMath(MergedMathInstr* instr) { | 1122 void ConstantPropagator::VisitTruncDivMod(TruncDivModInstr* instr) { |
1123 // TODO(srdjan): Handle merged instruction. | 1123 // TODO(srdjan): Handle merged instruction. |
1124 SetValue(instr, non_constant_); | 1124 SetValue(instr, non_constant_); |
1125 } | 1125 } |
1126 | 1126 |
1127 | 1127 |
1128 void ConstantPropagator::VisitExtractNthOutput(ExtractNthOutputInstr* instr) { | 1128 void ConstantPropagator::VisitExtractNthOutput(ExtractNthOutputInstr* instr) { |
1129 SetValue(instr, non_constant_); | 1129 SetValue(instr, non_constant_); |
1130 } | 1130 } |
1131 | 1131 |
1132 | 1132 |
(...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1731 GrowableArray<BitVector*> dominance_frontier; | 1731 GrowableArray<BitVector*> dominance_frontier; |
1732 graph_->ComputeDominators(&dominance_frontier); | 1732 graph_->ComputeDominators(&dominance_frontier); |
1733 | 1733 |
1734 if (FLAG_trace_constant_propagation && | 1734 if (FLAG_trace_constant_propagation && |
1735 FlowGraphPrinter::ShouldPrint(graph_->function())) { | 1735 FlowGraphPrinter::ShouldPrint(graph_->function())) { |
1736 FlowGraphPrinter::PrintGraph("After CP", graph_); | 1736 FlowGraphPrinter::PrintGraph("After CP", graph_); |
1737 } | 1737 } |
1738 } | 1738 } |
1739 | 1739 |
1740 } // namespace dart | 1740 } // namespace dart |
OLD | NEW |