Title: [143276] trunk/Source/_javascript_Core
- Revision
- 143276
- Author
- [email protected]
- Date
- 2013-02-18 17:15:04 -0800 (Mon, 18 Feb 2013)
Log Message
DFG backend Branch handling has duplicate code and dead code
https://bugs.webkit.org/show_bug.cgi?id=110162
Reviewed by Mark Hahnenberg.
Streamline the code, and make the 64 backend's optimizations make more sense
(i.e. not be dead code).
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::emitBranch):
(JSC::DFG::SpeculativeJIT::compile):
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (143275 => 143276)
--- trunk/Source/_javascript_Core/ChangeLog 2013-02-19 00:40:44 UTC (rev 143275)
+++ trunk/Source/_javascript_Core/ChangeLog 2013-02-19 01:15:04 UTC (rev 143276)
@@ -1,3 +1,19 @@
+2013-02-18 Filip Pizlo <[email protected]>
+
+ DFG backend Branch handling has duplicate code and dead code
+ https://bugs.webkit.org/show_bug.cgi?id=110162
+
+ Reviewed by Mark Hahnenberg.
+
+ Streamline the code, and make the 64 backend's optimizations make more sense
+ (i.e. not be dead code).
+
+ * dfg/DFGSpeculativeJIT32_64.cpp:
+ (JSC::DFG::SpeculativeJIT::compile):
+ * dfg/DFGSpeculativeJIT64.cpp:
+ (JSC::DFG::SpeculativeJIT::emitBranch):
+ (JSC::DFG::SpeculativeJIT::compile):
+
2013-02-18 Brent Fulgham <[email protected]>
[Windows] Unreviewed VS2010 build correction after r143273.
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp (143275 => 143276)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2013-02-19 00:40:44 UTC (rev 143275)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT32_64.cpp 2013-02-19 01:15:04 UTC (rev 143276)
@@ -3161,27 +3161,6 @@
}
case Branch:
- if (node->child1()->shouldSpeculateInteger()) {
- SpeculateIntegerOperand op(this, node->child1());
-
- BlockIndex taken = node->takenBlockIndex();
- BlockIndex notTaken = node->notTakenBlockIndex();
-
- MacroAssembler::ResultCondition condition = MacroAssembler::NonZero;
-
- if (taken == nextBlock()) {
- condition = MacroAssembler::Zero;
- BlockIndex tmp = taken;
- taken = notTaken;
- notTaken = tmp;
- }
-
- branchTest32(condition, op.gpr(), taken);
- jump(notTaken);
-
- noResult(node);
- break;
- }
emitBranch(node);
break;
Modified: trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp (143275 => 143276)
--- trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2013-02-19 00:40:44 UTC (rev 143275)
+++ trunk/Source/_javascript_Core/dfg/DFGSpeculativeJIT64.cpp 2013-02-19 01:15:04 UTC (rev 143276)
@@ -1866,10 +1866,12 @@
GPRTemporary result(this);
GPRReg resultGPR = result.gpr();
- branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(0))), notTaken);
- branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister, taken);
+ if (node->child1()->prediction() & SpecInt32) {
+ branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(0))), notTaken);
+ branch64(MacroAssembler::AboveOrEqual, valueGPR, GPRInfo::tagTypeNumberRegister, taken);
+ }
- if (!predictBoolean) {
+ if (node->child1()->prediction() & SpecBoolean) {
branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsBoolean(false))), notTaken);
branch64(MacroAssembler::Equal, valueGPR, MacroAssembler::TrustedImm64(JSValue::encode(jsBoolean(true))), taken);
}
@@ -3131,27 +3133,6 @@
}
case Branch:
- if (node->child1()->shouldSpeculateInteger()) {
- SpeculateIntegerOperand op(this, node->child1());
-
- BlockIndex taken = node->takenBlockIndex();
- BlockIndex notTaken = node->notTakenBlockIndex();
-
- MacroAssembler::ResultCondition condition = MacroAssembler::NonZero;
-
- if (taken == nextBlock()) {
- condition = MacroAssembler::Zero;
- BlockIndex tmp = taken;
- taken = notTaken;
- notTaken = tmp;
- }
-
- branchTest32(condition, op.gpr(), taken);
- jump(notTaken);
-
- noResult(node);
- break;
- }
emitBranch(node);
break;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes