From 78e3ef6bc5f8aa149f2f8bf0c78ce854c2f910fa Mon Sep 17 00:00:00 2001 From: Alexandre Rames Date: Wed, 12 Aug 2015 13:43:29 +0100 Subject: Add a GVN dependency 'GC' for garbage collection. This will be used by incoming architecture specific optimizations. The dependencies must be conservative. When an HInstruction is created we may not be sure whether it can trigger GC. In that case the 'ChangesGC' dependency must be set. We control at code-generation time that HInstructions that can call have the 'ChangesGC' dependency set. Change-Id: Iea6a7f430009f37a9599b0a0039207049906e45d --- compiler/optimizing/gvn.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'compiler/optimizing/gvn.cc') diff --git a/compiler/optimizing/gvn.cc b/compiler/optimizing/gvn.cc index 39006465d5..833dfb00a1 100644 --- a/compiler/optimizing/gvn.cc +++ b/compiler/optimizing/gvn.cc @@ -264,7 +264,7 @@ class ValueSet : public ArenaObject { // odd buckets to speed up deletion. size_t HashCode(HInstruction* instruction) const { size_t hash_code = instruction->ComputeHashCode(); - if (instruction->GetSideEffects().DoesAnyRead()) { + if (instruction->GetSideEffects().HasDependencies()) { return (hash_code << 1) | 0; } else { return (hash_code << 1) | 1; -- cgit v1.2.3-59-g8ed1b