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

Side by Side Diff: src/x64/lithium-x64.cc

Issue 246133005: Optimize numeric comparison with known successors. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Fix Created 6 years, 8 months 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 1603 matching lines...) Expand 10 before | Expand all | Expand 10 after
1614 LOperand* context = UseFixed(instr->context(), rsi); 1614 LOperand* context = UseFixed(instr->context(), rsi);
1615 LOperand* left = UseFixed(instr->left(), rdx); 1615 LOperand* left = UseFixed(instr->left(), rdx);
1616 LOperand* right = UseFixed(instr->right(), rax); 1616 LOperand* right = UseFixed(instr->right(), rax);
1617 LCmpT* result = new(zone()) LCmpT(context, left, right); 1617 LCmpT* result = new(zone()) LCmpT(context, left, right);
1618 return MarkAsCall(DefineFixed(result, rax), instr); 1618 return MarkAsCall(DefineFixed(result, rax), instr);
1619 } 1619 }
1620 1620
1621 1621
1622 LInstruction* LChunkBuilder::DoCompareNumericAndBranch( 1622 LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
1623 HCompareNumericAndBranch* instr) { 1623 HCompareNumericAndBranch* instr) {
1624 LInstruction* goto_instr = CheckElideControlInstruction(instr);
1625 if (goto_instr != NULL) return goto_instr;
1624 Representation r = instr->representation(); 1626 Representation r = instr->representation();
1625 if (r.IsSmiOrInteger32()) { 1627 if (r.IsSmiOrInteger32()) {
1626 ASSERT(instr->left()->representation().Equals(r)); 1628 ASSERT(instr->left()->representation().Equals(r));
1627 ASSERT(instr->right()->representation().Equals(r)); 1629 ASSERT(instr->right()->representation().Equals(r));
1628 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1630 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1629 LOperand* right = UseOrConstantAtStart(instr->right()); 1631 LOperand* right = UseOrConstantAtStart(instr->right());
1630 return new(zone()) LCompareNumericAndBranch(left, right); 1632 return new(zone()) LCompareNumericAndBranch(left, right);
1631 } else { 1633 } else {
1632 ASSERT(r.IsDouble()); 1634 ASSERT(r.IsDouble());
1633 ASSERT(instr->left()->representation().IsDouble()); 1635 ASSERT(instr->left()->representation().IsDouble());
(...skipping 973 matching lines...) Expand 10 before | Expand all | Expand 10 after
2607 LOperand* index = UseTempRegister(instr->index()); 2609 LOperand* index = UseTempRegister(instr->index());
2608 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2610 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2609 LInstruction* result = DefineSameAsFirst(load); 2611 LInstruction* result = DefineSameAsFirst(load);
2610 return AssignPointerMap(result); 2612 return AssignPointerMap(result);
2611 } 2613 }
2612 2614
2613 2615
2614 } } // namespace v8::internal 2616 } } // namespace v8::internal
2615 2617
2616 #endif // V8_TARGET_ARCH_X64 2618 #endif // V8_TARGET_ARCH_X64
OLDNEW
« no previous file with comments | « src/mips/lithium-mips.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698