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

Unified Diff: runtime/vm/flow_graph_optimizer.cc

Issue 14740005: Initial support for polymorphic 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
Index: runtime/vm/flow_graph_optimizer.cc
diff --git a/runtime/vm/flow_graph_optimizer.cc b/runtime/vm/flow_graph_optimizer.cc
index 555b8598e51571e389ed344f8a44353ab0e6b69b..6a7979751f6607959a3ac304e7d24714ac496c41 100644
--- a/runtime/vm/flow_graph_optimizer.cc
+++ b/runtime/vm/flow_graph_optimizer.cc
@@ -3161,8 +3161,7 @@ void LICM::Optimize() {
!it.Done();
it.Advance()) {
Instruction* current = it.Current();
- if (!current->IsPushArgument() &&
- current->AllowsCSE() &&
+ if (current->AllowsCSE() &&
flow_graph()->block_effects()->CanBeMovedTo(current, pre_header)) {
bool inputs_loop_invariant = true;
for (int i = 0; i < current->InputCount(); ++i) {
@@ -4376,6 +4375,11 @@ void ConstantPropagator::VisitPhi(PhiInstr* instr) {
}
+void ConstantPropagator::VisitRedefinition(RedefinitionInstr* instr) {
+ SetValue(instr, instr->value()->definition()->constant_value());
+}
+
+
void ConstantPropagator::VisitParameter(ParameterInstr* instr) {
SetValue(instr, non_constant_);
}
@@ -4650,6 +4654,11 @@ void ConstantPropagator::VisitLoadUntagged(LoadUntaggedInstr* instr) {
}
+void ConstantPropagator::VisitLoadClassId(LoadClassIdInstr* instr) {
+ SetValue(instr, non_constant_);
+}
+
+
void ConstantPropagator::VisitLoadField(LoadFieldInstr* instr) {
if ((instr->recognized_kind() == MethodRecognizer::kObjectArrayLength) &&
(instr->value()->definition()->IsCreateArray())) {

Powered by Google App Engine
This is Rietveld 408576698