diff options
| author | Vladimir Marko <vmarko@google.com> | 2018-05-04 13:32:25 +0100 |
|---|---|---|
| committer | Vladimir Marko <vmarko@google.com> | 2018-05-08 11:36:11 +0100 |
| commit | 0dcccd815684b4c7540f9c6d39de161e44e5f51c (patch) | |
| tree | 89fce5c16f7d05f81c302a75e2ff744a002a1a3e /compiler/optimizing/nodes.cc | |
| parent | bd78567cef305e35481734b7fc24f68ded031439 (diff) | |
| download | art-0dcccd815684b4c7540f9c6d39de161e44e5f51c.tar.gz art-0dcccd815684b4c7540f9c6d39de161e44e5f51c.tar.bz2 art-0dcccd815684b4c7540f9c6d39de161e44e5f51c.zip | |
ART: Remove InstructionTypeEquals().
Avoid the virtual call and simply compare the instruction
kinds.
Test: Rely on TreeHugger.
Change-Id: I7310de976614c5ec63d61a447a40047de5bc654d
Diffstat (limited to 'compiler/optimizing/nodes.cc')
| -rw-r--r-- | compiler/optimizing/nodes.cc | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/compiler/optimizing/nodes.cc b/compiler/optimizing/nodes.cc index f784f8f7f3..6029347ca8 100644 --- a/compiler/optimizing/nodes.cc +++ b/compiler/optimizing/nodes.cc @@ -1680,10 +1680,9 @@ bool HCondition::IsBeforeWhenDisregardMoves(HInstruction* instruction) const { } bool HInstruction::Equals(const HInstruction* other) const { - if (!InstructionTypeEquals(other)) return false; - DCHECK_EQ(GetKind(), other->GetKind()); - if (!InstructionDataEquals(other)) return false; + if (GetKind() != other->GetKind()) return false; if (GetType() != other->GetType()) return false; + if (!InstructionDataEquals(other)) return false; HConstInputsRef inputs = GetInputs(); HConstInputsRef other_inputs = other->GetInputs(); if (inputs.size() != other_inputs.size()) return false; |
