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/instruction_simplifier.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/instruction_simplifier.cc')
| -rw-r--r-- | compiler/optimizing/instruction_simplifier.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compiler/optimizing/instruction_simplifier.cc b/compiler/optimizing/instruction_simplifier.cc index 0fe16725f3..ca84d421a7 100644 --- a/compiler/optimizing/instruction_simplifier.cc +++ b/compiler/optimizing/instruction_simplifier.cc @@ -2666,10 +2666,10 @@ bool InstructionSimplifierVisitor::TryHandleAssociativeAndCommutativeOperation( HConstant* const2; HBinaryOperation* y; - if (instruction->InstructionTypeEquals(left) && right->IsConstant()) { + if (instruction->GetKind() == left->GetKind() && right->IsConstant()) { const2 = right->AsConstant(); y = left->AsBinaryOperation(); - } else if (left->IsConstant() && instruction->InstructionTypeEquals(right)) { + } else if (left->IsConstant() && instruction->GetKind() == right->GetKind()) { const2 = left->AsConstant(); y = right->AsBinaryOperation(); } else { |
