summaryrefslogtreecommitdiffstats
path: root/compiler/optimizing/optimization.cc
diff options
context:
space:
mode:
authorNicolas Geoffray <ngeoffray@google.com>2014-11-24 15:28:45 +0000
committerNicolas Geoffray <ngeoffray@google.com>2014-11-25 00:55:07 +0000
commit3159674c0863f53cfbc1913d493550221ac47f02 (patch)
tree5dc34e8da8dc695cf80040ba0dbc5312060c10c1 /compiler/optimizing/optimization.cc
parent4d3ed1a6f34bd31ed30faaca0433cf2a4b19bb7b (diff)
downloadart-3159674c0863f53cfbc1913d493550221ac47f02.zip
art-3159674c0863f53cfbc1913d493550221ac47f02.tar.gz
art-3159674c0863f53cfbc1913d493550221ac47f02.tar.bz2
Fix a bug in the type analysis phase of optimizing.
Dex code can lead to the creation of a phi with one float input and one integer input. Since the SSA builder trusts the verifier, it assumes that the integer input must be converted to float. However, when the register is not used afterwards, the verifier hasn't ensured that. Therefore, the compiler must remove the phi prior to doing type propagation. Change-Id: Idcd51c4dccce827c59d1f2b253bc1c919bc07df5
Diffstat (limited to 'compiler/optimizing/optimization.cc')
-rw-r--r--compiler/optimizing/optimization.cc6
1 files changed, 4 insertions, 2 deletions
diff --git a/compiler/optimizing/optimization.cc b/compiler/optimizing/optimization.cc
index d1178d5..b99f678 100644
--- a/compiler/optimizing/optimization.cc
+++ b/compiler/optimizing/optimization.cc
@@ -27,13 +27,15 @@ void HOptimization::Check() {
SSAChecker checker(graph_->GetArena(), graph_);
checker.Run();
if (!checker.IsValid()) {
- LOG(FATAL) << Dumpable<SSAChecker>(checker);
+ LOG(FATAL) << "Error after " << GetPassName() << ": "
+ << Dumpable<SSAChecker>(checker);
}
} else {
GraphChecker checker(graph_->GetArena(), graph_);
checker.Run();
if (!checker.IsValid()) {
- LOG(FATAL) << Dumpable<GraphChecker>(checker);
+ LOG(FATAL) << "Error after " << GetPassName() << ": "
+ << Dumpable<GraphChecker>(checker);
}
}
}