Revision: 7882
Author:   [email protected]
Date:     Fri May 13 01:21:35 2011
Log: Use type feedback for unary minus, improving the performance on e.g. 3d-cube by
7.2% and math-cordic by 5.7%.
Review URL: http://codereview.chromium.org/7013025
http://code.google.com/p/v8/source/detail?r=7882

Modified:
 /branches/bleeding_edge/src/hydrogen.cc

=======================================
--- /branches/bleeding_edge/src/hydrogen.cc     Thu May 12 07:56:56 2011
+++ /branches/bleeding_edge/src/hydrogen.cc     Fri May 13 01:21:35 2011
@@ -4633,6 +4633,10 @@
   CHECK_ALIVE(VisitForValue(expr->expression()));
   HValue* value = Pop();
HInstruction* instr = new(zone()) HMul(value, graph_->GetConstantMinus1());
+  TypeInfo info = oracle()->UnaryType(expr);
+  Representation rep = ToRepresentation(info);
+  TraceRepresentation(expr->op(), info, instr, rep);
+  AssumeRepresentation(instr, rep);
   ast_context()->ReturnInstruction(instr, expr->id());
 }

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to