Reviewers: Sven Panne,
Description:
Fix approximation of CanDeoptimize() and other small store elimination
fixes.
[email protected]
BUG=
Please review this at https://codereview.chromium.org/210813004/
SVN Base: https://v8.googlecode.com/svn/branches/bleeding_edge
Affected files (+2, -3 lines):
M src/hydrogen-instructions.cc
M src/hydrogen-store-elimination.cc
Index: src/hydrogen-instructions.cc
diff --git a/src/hydrogen-instructions.cc b/src/hydrogen-instructions.cc
index
b822d8437f1cdff43039925e711f4e403f549905..7a40dbe6da04ad3301d1c10d651834d08c75f1f4
100644
--- a/src/hydrogen-instructions.cc
+++ b/src/hydrogen-instructions.cc
@@ -863,7 +863,6 @@ bool HInstruction::CanDeoptimize() {
case HValue::kDateField:
case HValue::kDebugBreak:
case HValue::kDeclareGlobals:
- case HValue::kDiv:
case HValue::kDummyUse:
case HValue::kEnterInlined:
case HValue::kEnvironmentMarker:
@@ -890,7 +889,6 @@ bool HInstruction::CanDeoptimize() {
case HValue::kMapEnumLength:
case HValue::kMathFloorOfDiv:
case HValue::kMathMinMax:
- case HValue::kMod:
case HValue::kMul:
case HValue::kOsrEntry:
case HValue::kParameter:
@@ -937,6 +935,7 @@ bool HInstruction::CanDeoptimize() {
}
return false;
default:
+ // TODO(titzer): kDiv and kMod can deoptimize under some
circumstances.
return true;
}
}
Index: src/hydrogen-store-elimination.cc
diff --git a/src/hydrogen-store-elimination.cc
b/src/hydrogen-store-elimination.cc
index
2e6ee513877b3ea2b07f1d8fb9fc7f51c0212a0a..ed18e99e8172d202b17925dade85e7877abd0bd3
100644
--- a/src/hydrogen-store-elimination.cc
+++ b/src/hydrogen-store-elimination.cc
@@ -129,7 +129,7 @@ void HStoreEliminationPhase::ProcessInstr(HInstruction*
instr,
unobserved_.Rewind(0);
return;
}
- if (instr->ChangesFlags().ContainsAnyOf(flags)) {
+ if (instr->DependsOnFlags().ContainsAnyOf(flags)) {
TRACE(("-- Observed stores at I%d (GVN flags)\n", instr->id()));
unobserved_.Rewind(0);
return;
--
--
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.