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 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@7882 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
parent
2838a3c78b
commit
78f4dd1208
@ -4633,6 +4633,10 @@ void HGraphBuilder::VisitSub(UnaryOperation* expr) {
|
||||
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());
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user