Commit b37c0890 authored by dusan.milosavljevic's avatar dusan.milosavljevic Committed by Commit bot

MIPS: Tweak constants to be in favor of table switch.

In prevous set-up table switch is rarely generated.

TEST=cctest/test-serialize/SerializeInternalReference
BUG=

Review URL: https://codereview.chromium.org/1019463003

Cr-Commit-Position: refs/heads/master@{#27307}
parent 0819ed9f
......@@ -784,7 +784,7 @@ void InstructionSelector::VisitSwitch(Node* node, BasicBlock* default_branch,
// Determine whether to issue an ArchTableSwitch or an ArchLookupSwitch
// instruction.
size_t table_space_cost = 9 + value_range;
size_t table_time_cost = 9;
size_t table_time_cost = 3;
size_t lookup_space_cost = 2 + 2 * case_count;
size_t lookup_time_cost = case_count;
if (case_count > 0 &&
......
......@@ -968,7 +968,7 @@ void InstructionSelector::VisitSwitch(Node* node, BasicBlock* default_branch,
// Determine whether to issue an ArchTableSwitch or an ArchLookupSwitch
// instruction.
size_t table_space_cost = 10 + 2 * value_range;
size_t table_time_cost = 10;
size_t table_time_cost = 3;
size_t lookup_space_cost = 2 + 2 * case_count;
size_t lookup_time_cost = case_count;
if (case_count > 0 &&
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment