summaryrefslogtreecommitdiff
path: root/compiler/optimizing/graph_checker.h
diff options
context:
space:
mode:
author Nicolas Geoffray <ngeoffray@google.com> 2015-06-29 10:56:34 +0100
committer Nicolas Geoffray <ngeoffray@google.com> 2015-06-29 10:59:19 +0100
commit30eb58c548bee08468f68eb140a74a51dd7d9b43 (patch)
tree28412484547b9bfb4a4773df103cef5f485c3a67 /compiler/optimizing/graph_checker.h
parent8d1a8c00b89775a251ac5e26a557f81ac1491a44 (diff)
Do not update the type of something we already know.
This is both an optimization to avoid unneeded nodes, and correctness to avoid replacing the second input of `HInstanceOf` and `HCheckCast` to something that is not `HLoadClass`. bug:22116987 Change-Id: I4907197a9002883d7cae8265a9642512b6201396
Diffstat (limited to 'compiler/optimizing/graph_checker.h')
-rw-r--r--compiler/optimizing/graph_checker.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/optimizing/graph_checker.h b/compiler/optimizing/graph_checker.h
index bafa69d422..7c72e23e2d 100644
--- a/compiler/optimizing/graph_checker.h
+++ b/compiler/optimizing/graph_checker.h
@@ -48,6 +48,10 @@ class GraphChecker : public HGraphDelegateVisitor {
// Check that the HasBoundsChecks() flag is set for bounds checks.
void VisitBoundsCheck(HBoundsCheck* check) OVERRIDE;
+ // Check that HCheckCast and HInstanceOf have HLoadClass as second input.
+ void VisitCheckCast(HCheckCast* check) OVERRIDE;
+ void VisitInstanceOf(HInstanceOf* check) OVERRIDE;
+
// Check that the Return and ReturnVoid jump to the exit block.
void VisitReturn(HReturn* ret) OVERRIDE;
void VisitReturnVoid(HReturnVoid* ret) OVERRIDE;