Revision: 23102
Author: [email protected]
Date: Wed Aug 13 11:46:05 2014 UTC
Log: Remove a brittle assertion from Turbofan lazy deoptimization
handling.
As discussed in person with Benedikt, it is better to remove the assertion
because it is too brittle. The assertion says that the continuation block
should immediately follow the call. However, there are exceptions - such as
nop or constant pool in-between being fine - that make the assertion
brittle.
BUG=
[email protected]
Review URL: https://codereview.chromium.org/471523002
http://code.google.com/p/v8/source/detail?r=23102
Modified:
/branches/bleeding_edge/src/compiler/arm/code-generator-arm.cc
/branches/bleeding_edge/src/compiler/arm64/code-generator-arm64.cc
/branches/bleeding_edge/src/compiler/code-generator.cc
/branches/bleeding_edge/src/compiler/code-generator.h
/branches/bleeding_edge/src/compiler/ia32/code-generator-ia32.cc
/branches/bleeding_edge/src/compiler/x64/code-generator-x64.cc
/branches/bleeding_edge/test/cctest/cctest.status
=======================================
--- /branches/bleeding_edge/src/compiler/arm/code-generator-arm.cc Mon Aug
4 11:34:54 2014 UTC
+++ /branches/bleeding_edge/src/compiler/arm/code-generator-arm.cc Wed Aug
13 11:46:05 2014 UTC
@@ -831,16 +831,6 @@
// On 32-bit ARM we do not insert nops for inlined Smi code.
UNREACHABLE();
}
-
-#ifdef DEBUG
-
-// Checks whether the code between start_pc and end_pc is a no-op.
-bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int
start_pc,
- int end_pc) {
- return false;
-}
-
-#endif // DEBUG
#undef __
}
=======================================
--- /branches/bleeding_edge/src/compiler/arm64/code-generator-arm64.cc Mon
Aug 11 15:40:11 2014 UTC
+++ /branches/bleeding_edge/src/compiler/arm64/code-generator-arm64.cc Wed
Aug 13 11:46:05 2014 UTC
@@ -832,23 +832,6 @@
#undef __
-#if DEBUG
-
-// Checks whether the code between start_pc and end_pc is a no-op.
-bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int
start_pc,
- int end_pc) {
- if (start_pc + 4 != end_pc) {
- return false;
- }
- Address instr_address = code->instruction_start() + start_pc;
-
- v8::internal::Instruction* instr =
- reinterpret_cast<v8::internal::Instruction*>(instr_address);
- return instr->IsMovz() && instr->Rd() == xzr.code() &&
instr->SixtyFourBits();
-}
-
-#endif // DEBUG
-
} // namespace compiler
} // namespace internal
} // namespace v8
=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.cc Mon Aug 11
12:26:17 2014 UTC
+++ /branches/bleeding_edge/src/compiler/code-generator.cc Wed Aug 13
11:46:05 2014 UTC
@@ -225,9 +225,6 @@
// Populate the return address patcher entries.
for (int i = 0; i < patch_count; ++i) {
LazyDeoptimizationEntry entry = lazy_deoptimization_entries_[i];
- DCHECK(entry.position_after_call() == entry.continuation()->pos() ||
- IsNopForSmiCodeInlining(code_object,
entry.position_after_call(),
- entry.continuation()->pos()));
data->SetReturnAddressPc(i, Smi::FromInt(entry.position_after_call()));
data->SetPatchedAddressPc(i,
Smi::FromInt(entry.deoptimization()->pos()));
}
@@ -364,15 +361,6 @@
void CodeGenerator::AddNopForSmiCodeInlining() { UNIMPLEMENTED(); }
-
-
-#ifdef DEBUG
-bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int
start_pc,
- int end_pc) {
- UNIMPLEMENTED();
- return false;
-}
-#endif
#endif // !V8_TURBOFAN_BACKEND
=======================================
--- /branches/bleeding_edge/src/compiler/code-generator.h Wed Aug 6
11:49:02 2014 UTC
+++ /branches/bleeding_edge/src/compiler/code-generator.h Wed Aug 13
11:46:05 2014 UTC
@@ -88,10 +88,6 @@
void AddTranslationForOperand(Translation* translation, Instruction*
instr,
InstructionOperand* op);
void AddNopForSmiCodeInlining();
-#if DEBUG
- static bool IsNopForSmiCodeInlining(Handle<Code> code, int start_pc,
- int end_pc);
-#endif // DEBUG
//
===========================================================================
class LazyDeoptimizationEntry V8_FINAL {
=======================================
--- /branches/bleeding_edge/src/compiler/ia32/code-generator-ia32.cc Mon
Aug 4 11:34:54 2014 UTC
+++ /branches/bleeding_edge/src/compiler/ia32/code-generator-ia32.cc Wed
Aug 13 11:46:05 2014 UTC
@@ -938,19 +938,6 @@
#undef __
-#ifdef DEBUG
-
-// Checks whether the code between start_pc and end_pc is a no-op.
-bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int
start_pc,
- int end_pc) {
- if (start_pc + 1 != end_pc) {
- return false;
- }
- return *(code->instruction_start() + start_pc) ==
- v8::internal::Assembler::kNopByte;
-}
-
-#endif // DEBUG
}
}
} // namespace v8::internal::compiler
=======================================
--- /branches/bleeding_edge/src/compiler/x64/code-generator-x64.cc Tue Aug
5 13:06:17 2014 UTC
+++ /branches/bleeding_edge/src/compiler/x64/code-generator-x64.cc Wed Aug
13 11:46:05 2014 UTC
@@ -982,20 +982,6 @@
#undef __
-#ifdef DEBUG
-
-// Checks whether the code between start_pc and end_pc is a no-op.
-bool CodeGenerator::IsNopForSmiCodeInlining(Handle<Code> code, int
start_pc,
- int end_pc) {
- if (start_pc + 1 != end_pc) {
- return false;
- }
- return *(code->instruction_start() + start_pc) ==
- v8::internal::Assembler::kNopByte;
-}
-
-#endif
-
} // namespace internal
} // namespace compiler
} // namespace v8
=======================================
--- /branches/bleeding_edge/test/cctest/cctest.status Wed Aug 13 10:23:17
2014 UTC
+++ /branches/bleeding_edge/test/cctest/cctest.status Wed Aug 13 11:46:05
2014 UTC
@@ -179,11 +179,6 @@
'test-api/Bug618': [PASS],
- # TODO(turbofan): Deoptimization support buggy with snapshot=off.
- 'test-run-deopt/*': [PASS, ['no_snap == True', NO_VARIANTS]],
- 'test-deoptimization/*': [PASS, ['no_snap == True', NO_VARIANTS]],
- 'test-scheduler/BuildScheduleTrivialLazyDeoptCall': [PASS, ['no_snap ==
True', NO_VARIANTS]],
-
# BUG(v8:3385).
'test-serialize/DeserializeFromSecondSerialization': [PASS, FAIL],
'test-serialize/DeserializeFromSecondSerializationAndRunScript2': [PASS,
FAIL],
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.