Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6)

Unified Diff: src/arm/lithium-codegen-arm.cc

Issue 100483006: [arm] Drop useless branches in full and lithium codegen. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/arm/lithium-codegen-arm.cc
diff --git a/src/arm/lithium-codegen-arm.cc b/src/arm/lithium-codegen-arm.cc
index 8f1c9c090dfbdf6e1de38ed34c1f028a2efbe8b0..425acdbd48c70ad6a2894e05162c13888c84af6a 100644
--- a/src/arm/lithium-codegen-arm.cc
+++ b/src/arm/lithium-codegen-arm.cc
@@ -1414,12 +1414,9 @@ void LCodeGen::DoDivI(LDivI* instr) {
// Check for (kMinInt / -1).
if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
- Label left_not_min_int;
__ cmp(left, Operand(kMinInt));
- __ b(ne, &left_not_min_int);
- __ cmp(right, Operand(-1));
+ __ cmp(right, Operand(-1), eq);
Sven Panne 2013/12/12 13:43:23 Is conditional non-execution of 2 instructions rea
Rodolph Perfetta 2013/12/13 11:31:14 conditional execution of two "simple" instructions
DeoptimizeIf(eq, instr->environment());
- __ bind(&left_not_min_int);
}
if (CpuFeatures::IsSupported(SUDIV)) {
@@ -1518,12 +1515,9 @@ void LCodeGen::DoMathFloorOfDiv(LMathFloorOfDiv* instr) {
// Check for (kMinInt / -1).
if (instr->hydrogen()->CheckFlag(HValue::kCanOverflow)) {
- Label left_not_min_int;
__ cmp(left, Operand(kMinInt));
- __ b(ne, &left_not_min_int);
- __ cmp(right, Operand(-1));
+ __ cmp(right, Operand(-1), eq);
Sven Panne 2013/12/12 13:43:23 Same here...
DeoptimizeIf(eq, instr->environment());
- __ bind(&left_not_min_int);
}
// Check for (0 / -x) that will produce negative zero.
@@ -1892,8 +1886,7 @@ void LCodeGen::DoValueOf(LValueOf* instr) {
// If the object is not a value type, return the object.
__ CompareObjectType(input, map, map, JS_VALUE_TYPE);
__ Move(result, input, ne);
- __ b(ne, &done);
- __ ldr(result, FieldMemOperand(input, JSValue::kValueOffset));
+ __ ldr(result, FieldMemOperand(input, JSValue::kValueOffset), eq);
__ bind(&done);
}
@@ -3447,16 +3440,12 @@ void LCodeGen::DoArgumentsLength(LArgumentsLength* instr) {
// If no arguments adaptor frame the number of arguments is fixed.
__ cmp(fp, elem);
__ mov(result, Operand(scope()->num_parameters()));
- __ b(eq, &done);
// Arguments adaptor frame present. Get argument length from there.
- __ ldr(result, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
+ __ ldr(result, MemOperand(fp, StandardFrameConstants::kCallerFPOffset), ne);
Sven Panne 2013/12/12 13:43:23 ... and here (3 instructions now)
Rodolph Perfetta 2013/12/13 11:31:14 Here the answer would depend on the surrounding co
Benedikt Meurer 2014/01/02 06:49:28 Reverted this one.
__ ldr(result,
- MemOperand(result, ArgumentsAdaptorFrameConstants::kLengthOffset));
- __ SmiUntag(result);
-
- // Argument length is in result register.
- __ bind(&done);
+ MemOperand(result, ArgumentsAdaptorFrameConstants::kLengthOffset), ne);
+ __ SmiUntag(result, LeaveCC, ne);
}
@@ -3878,16 +3867,13 @@ void LCodeGen::DoMathPowHalf(LMathPowHalf* instr) {
// Note that according to ECMA-262 15.8.2.13:
// Math.pow(-Infinity, 0.5) == Infinity
// Math.sqrt(-Infinity) == NaN
- Label done;
__ vmov(temp, -V8_INFINITY, scratch0());
__ VFPCompareAndSetFlags(input, temp);
__ vneg(result, temp, eq);
- __ b(&done, eq);
// Add +0 to convert -0 to +0.
- __ vadd(result, input, kDoubleRegZero);
- __ vsqrt(result, result);
- __ bind(&done);
+ __ vadd(result, input, kDoubleRegZero, ne);
Sven Panne 2013/12/12 13:43:23 ... and here.
Rodolph Perfetta 2013/12/13 11:31:14 vadd and especially vsqrt are complex instructions
Benedikt Meurer 2014/01/02 06:49:28 Done.
+ __ vsqrt(result, result, ne);
}
@@ -5587,14 +5573,11 @@ void LCodeGen::EmitIsConstructCall(Register temp1, Register temp2) {
__ ldr(temp1, MemOperand(fp, StandardFrameConstants::kCallerFPOffset));
// Skip the arguments adaptor frame if it exists.
- Label check_frame_marker;
__ ldr(temp2, MemOperand(temp1, StandardFrameConstants::kContextOffset));
__ cmp(temp2, Operand(Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)));
- __ b(ne, &check_frame_marker);
- __ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset));
+ __ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kCallerFPOffset), eq);
// Check the marker in the calling frame.
- __ bind(&check_frame_marker);
__ ldr(temp1, MemOperand(temp1, StandardFrameConstants::kMarkerOffset));
__ cmp(temp1, Operand(Smi::FromInt(StackFrame::CONSTRUCT)));
}
« no previous file with comments | « src/arm/full-codegen-arm.cc ('k') | src/arm/macro-assembler-arm.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698