Revision: 16253
Author: [email protected]
Date: Wed Aug 21 08:28:59 2013 UTC
Log: Use CheckUsesForFlag to check flag in uses list
BUG=
[email protected]
Review URL: https://codereview.chromium.org/22862009
Patch from Weiliang Lin <[email protected]>.
http://code.google.com/p/v8/source/detail?r=16253
Modified:
/branches/bleeding_edge/src/arm/lithium-arm.cc
/branches/bleeding_edge/src/ia32/lithium-ia32.cc
/branches/bleeding_edge/src/mips/lithium-mips.cc
/branches/bleeding_edge/src/x64/lithium-x64.cc
=======================================
--- /branches/bleeding_edge/src/arm/lithium-arm.cc Wed Aug 14 08:54:27 2013
UTC
+++ /branches/bleeding_edge/src/arm/lithium-arm.cc Wed Aug 21 08:28:59 2013
UTC
@@ -718,12 +718,7 @@
// Left shifts can deoptimize if we shift by > 0 and the result cannot
be
// truncated to smi.
if (instr->representation().IsSmi() && constant_value > 0) {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToSmi)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi);
}
} else {
right = UseRegisterAtStart(right_value);
@@ -735,12 +730,7 @@
if (FLAG_opt_safe_uint32_operations) {
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
} else {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
}
}
=======================================
--- /branches/bleeding_edge/src/ia32/lithium-ia32.cc Wed Aug 14 08:54:27
2013 UTC
+++ /branches/bleeding_edge/src/ia32/lithium-ia32.cc Wed Aug 21 08:28:59
2013 UTC
@@ -772,12 +772,7 @@
// Left shifts can deoptimize if we shift by > 0 and the result cannot
be
// truncated to smi.
if (instr->representation().IsSmi() && constant_value > 0) {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToSmi)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi);
}
} else {
right = UseFixed(right_value, ecx);
@@ -789,12 +784,7 @@
if (FLAG_opt_safe_uint32_operations) {
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
} else {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
}
}
=======================================
--- /branches/bleeding_edge/src/mips/lithium-mips.cc Wed Aug 14 23:07:48
2013 UTC
+++ /branches/bleeding_edge/src/mips/lithium-mips.cc Wed Aug 21 08:28:59
2013 UTC
@@ -723,12 +723,7 @@
// Left shifts can deoptimize if we shift by > 0 and the result cannot
be
// truncated to smi.
if (instr->representation().IsSmi() && constant_value > 0) {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToSmi)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToSmi);
}
} else {
right = UseRegisterAtStart(right_value);
@@ -740,12 +735,7 @@
if (FLAG_opt_safe_uint32_operations) {
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
} else {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
}
}
=======================================
--- /branches/bleeding_edge/src/x64/lithium-x64.cc Wed Aug 14 08:54:27 2013
UTC
+++ /branches/bleeding_edge/src/x64/lithium-x64.cc Wed Aug 21 08:28:59 2013
UTC
@@ -734,12 +734,7 @@
if (FLAG_opt_safe_uint32_operations) {
does_deopt = !instr->CheckFlag(HInstruction::kUint32);
} else {
- for (HUseIterator it(instr->uses()); !it.Done(); it.Advance()) {
- if (!it.value()->CheckFlag(HValue::kTruncatingToInt32)) {
- does_deopt = true;
- break;
- }
- }
+ does_deopt = !instr->CheckUsesForFlag(HValue::kTruncatingToInt32);
}
}
--
--
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/groups/opt_out.