From ca0975849993c857617d3359fb3762f0460235a6 Mon Sep 17 00:00:00 2001 From: "plind44@gmail.com" Date: Thu, 8 Aug 2013 05:04:42 +0000 Subject: [PATCH] MIPS: Optimize DoCheckMaps. This simple change moves the Deoptimize call into the Deopt table where it belongs, and shortens the inline map-check. Gives a surprisingly large performance gain, around 4% on Octane. BUG= R=gergely@homejinni.com Review URL: https://codereview.chromium.org/22391008 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@16115 ce2b1a6d-e550-0410-aec6-3dcde31c8c00 --- src/mips/lithium-codegen-mips.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/mips/lithium-codegen-mips.cc b/src/mips/lithium-codegen-mips.cc index a753091..75d8316 100644 --- a/src/mips/lithium-codegen-mips.cc +++ b/src/mips/lithium-codegen-mips.cc @@ -5253,11 +5253,11 @@ void LCodeGen::DoCheckMaps(LCheckMaps* instr) { __ CompareMapAndBranch(map_reg, map, &success, eq, &success); } Handle map = map_set->last(); - __ CompareMapAndBranch(map_reg, map, &success, eq, &success); + // Do the CompareMap() directly within the Branch() and DeoptimizeIf(). if (instr->hydrogen()->has_migration_target()) { - __ Branch(deferred->entry()); + __ Branch(deferred->entry(), ne, map_reg, Operand(map)); } else { - DeoptimizeIf(al, instr->environment()); + DeoptimizeIf(ne, instr->environment(), map_reg, Operand(map)); } __ bind(&success); -- 2.7.4