summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.cc
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2016-04-22 13:16:14 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2016-04-27 10:18:48 +0100
commit93a18c5d4160f632ecdb92af099574e9c7098c49 (patch)
tree328e28e160fe894fb9487a625cbbfc4ab94c093c /compiler/optimizing/graph_checker.cc
parentf7cda8088ec57ab1422f85f08df78e217a9f7094 (diff)
Forbid HDeoptimize instructions in OSR methods.
Otherwise dominated instructions will assume something that isn't necessarily correct if coming from the interpreter. bug:28335959 bug:28249238 bug:28348878 bug:28080135 Change-Id: I842bd1c6a919aff48cf6048d2ea51cf2d40f3c1d
Diffstat (limited to 'compiler/optimizing/graph_checker.cc')
-rw-r--r--compiler/optimizing/graph_checker.cc9
1 files changed, 9 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_checker.cc b/compiler/optimizing/graph_checker.cc
index 96837a8266..968e26724d 100644
--- a/compiler/optimizing/graph_checker.cc
+++ b/compiler/optimizing/graph_checker.cc
@@ -258,6 +258,15 @@ void GraphChecker::VisitBoundsCheck(HBoundsCheck* check) {
VisitInstruction(check);
}
+void GraphChecker::VisitDeoptimize(HDeoptimize* deopt) {
+ if (GetGraph()->IsCompilingOsr()) {
+ AddError(StringPrintf("A graph compiled OSR cannot have a HDeoptimize instruction"));
+ }
+
+ // Perform the instruction base checks too.
+ VisitInstruction(deopt);
+}
+
void GraphChecker::VisitTryBoundary(HTryBoundary* try_boundary) {
ArrayRef<HBasicBlock* const> handlers = try_boundary->GetExceptionHandlers();