Remove FLAG_opt_safe_uint32_operations.
It has been turned on by default for a long time, and hydrogenized BinaryOpStubs actually depend on it being turned on. BUG=v8:3487 LOG=n R=ishell@chromium.org Review URL: https://codereview.chromium.org/630023002 git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@24415 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
eb00c5301a
commit
b6f82c734c
@ -699,11 +699,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
// Shift operations can only deoptimize if we do a logical shift
|
||||
// by 0 and the result cannot be truncated to int32.
|
||||
if (op == Token::SHR && constant_value == 0) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
|
@ -2236,11 +2236,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
(JSShiftAmountFromHConstant(instr->right()) == 0);
|
||||
bool can_deopt = false;
|
||||
if ((op == Token::SHR) && right_can_be_zero) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
can_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
can_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
can_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result;
|
||||
|
@ -307,9 +307,6 @@ DEFINE_INT(escape_analysis_iterations, 2,
|
||||
"maximum number of escape analysis fix-point iterations")
|
||||
|
||||
DEFINE_BOOL(optimize_for_in, true, "optimize functions containing for-in loops")
|
||||
DEFINE_BOOL(opt_safe_uint32_operations, true,
|
||||
"allow uint32 values on optimize frames if they are used only in "
|
||||
"safe operations")
|
||||
|
||||
DEFINE_BOOL(concurrent_recompilation, true,
|
||||
"optimizing hot functions asynchronously on a separate thread")
|
||||
|
@ -2686,9 +2686,8 @@ HInstruction* HGraphBuilder::AddElementAccess(
|
||||
DCHECK(val == NULL);
|
||||
HLoadKeyed* load = Add<HLoadKeyed>(
|
||||
elements, checked_key, dependency, elements_kind, load_mode);
|
||||
if (FLAG_opt_safe_uint32_operations &&
|
||||
(elements_kind == EXTERNAL_UINT32_ELEMENTS ||
|
||||
elements_kind == UINT32_ELEMENTS)) {
|
||||
if (elements_kind == EXTERNAL_UINT32_ELEMENTS ||
|
||||
elements_kind == UINT32_ELEMENTS) {
|
||||
graph()->RecordUint32Instruction(load);
|
||||
}
|
||||
return load;
|
||||
@ -4400,7 +4399,7 @@ bool HGraph::Optimize(BailoutReason* bailout_reason) {
|
||||
// Must be performed before canonicalization to ensure that Canonicalize
|
||||
// will not remove semantically meaningful ToInt32 operations e.g. BIT_OR with
|
||||
// zero.
|
||||
if (FLAG_opt_safe_uint32_operations) Run<HUint32AnalysisPhase>();
|
||||
Run<HUint32AnalysisPhase>();
|
||||
|
||||
if (FLAG_use_canonicalizing) Run<HCanonicalizePhase>();
|
||||
|
||||
@ -10456,8 +10455,7 @@ HValue* HGraphBuilder::BuildBinaryOperation(
|
||||
break;
|
||||
case Token::SHR:
|
||||
instr = AddUncasted<HShr>(left, right);
|
||||
if (FLAG_opt_safe_uint32_operations && instr->IsShr() &&
|
||||
CanBeZero(right)) {
|
||||
if (instr->IsShr() && CanBeZero(right)) {
|
||||
graph()->RecordUint32Instruction(instr);
|
||||
}
|
||||
break;
|
||||
|
@ -739,11 +739,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
// Shift operations can only deoptimize if we do a logical shift by 0 and
|
||||
// the result cannot be truncated to int32.
|
||||
if (op == Token::SHR && constant_value == 0) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
|
@ -706,11 +706,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
// Shift operations can only deoptimize if we do a logical shift
|
||||
// by 0 and the result cannot be truncated to int32.
|
||||
if (op == Token::SHR && constant_value == 0) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
|
@ -706,11 +706,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
// Shift operations can only deoptimize if we do a logical shift
|
||||
// by 0 and the result cannot be truncated to int32.
|
||||
if (op == Token::SHR && constant_value == 0) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
|
@ -722,11 +722,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
// Shift operations can only deoptimize if we do a logical shift by 0 and
|
||||
// the result cannot be truncated to int32.
|
||||
if (op == Token::SHR && constant_value == 0) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
|
@ -736,11 +736,7 @@ LInstruction* LChunkBuilder::DoShift(Token::Value op,
|
||||
// Shift operations can only deoptimize if we do a logical shift by 0 and
|
||||
// the result cannot be truncated to int32.
|
||||
if (op == Token::SHR && constant_value == 0) {
|
||||
if (FLAG_opt_safe_uint32_operations) {
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
} else {
|
||||
does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
|
||||
}
|
||||
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
|
||||
}
|
||||
|
||||
LInstruction* result =
|
||||
|
@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style license that can be
|
||||
// found in the LICENSE file.
|
||||
|
||||
// Flags: --allow-natives-syntax --noopt-safe-uint32-operations
|
||||
// Flags: --allow-natives-syntax
|
||||
|
||||
// Check the results of `left >>> right`. The result is always unsigned (and
|
||||
// therefore positive).
|
||||
|
@ -51,10 +51,6 @@
|
||||
# Issue 3389: deopt_every_n_garbage_collections is unsafe
|
||||
'regress/regress-2653': [SKIP],
|
||||
|
||||
# This test relies on --noopt-safe-uint32-operations, which is broken. See
|
||||
# issue 3487 for details.
|
||||
'compiler/shift-shr': [SKIP],
|
||||
|
||||
##############################################################################
|
||||
# TurboFan compiler failures.
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user