Reviewers: danno, fschneider,

Description:
Use type feedback for unary minus, improving the performance on e.g. 3d-cube by
7.2% and math-cordic by 5.7%.

Please review this at http://codereview.chromium.org/7013025/

SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/

Affected files:
  M     src/hydrogen.cc


Index: src/hydrogen.cc
===================================================================
--- src/hydrogen.cc     (revision 7874)
+++ src/hydrogen.cc     (working copy)
@@ -4630,6 +4630,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