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

Side by Side Diff: src/mips/lithium-mips.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/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | 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 1608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1619 LOperand* context = UseFixed(instr->context(), cp); 1619 LOperand* context = UseFixed(instr->context(), cp);
1620 LOperand* left = UseFixed(instr->left(), a1); 1620 LOperand* left = UseFixed(instr->left(), a1);
1621 LOperand* right = UseFixed(instr->right(), a0); 1621 LOperand* right = UseFixed(instr->right(), a0);
1622 LCmpT* result = new(zone()) LCmpT(context, left, right); 1622 LCmpT* result = new(zone()) LCmpT(context, left, right);
1623 return MarkAsCall(DefineFixed(result, v0), instr); 1623 return MarkAsCall(DefineFixed(result, v0), instr);
1624 } 1624 }
1625 1625
1626 1626
1627 LInstruction* LChunkBuilder::DoCompareNumericAndBranch( 1627 LInstruction* LChunkBuilder::DoCompareNumericAndBranch(
1628 HCompareNumericAndBranch* instr) { 1628 HCompareNumericAndBranch* instr) {
1629 LInstruction* goto_instr = CheckElideControlInstruction(instr);
1630 if (goto_instr != NULL) return goto_instr;
1629 Representation r = instr->representation(); 1631 Representation r = instr->representation();
1630 if (r.IsSmiOrInteger32()) { 1632 if (r.IsSmiOrInteger32()) {
1631 ASSERT(instr->left()->representation().Equals(r)); 1633 ASSERT(instr->left()->representation().Equals(r));
1632 ASSERT(instr->right()->representation().Equals(r)); 1634 ASSERT(instr->right()->representation().Equals(r));
1633 LOperand* left = UseRegisterOrConstantAtStart(instr->left()); 1635 LOperand* left = UseRegisterOrConstantAtStart(instr->left());
1634 LOperand* right = UseRegisterOrConstantAtStart(instr->right()); 1636 LOperand* right = UseRegisterOrConstantAtStart(instr->right());
1635 return new(zone()) LCompareNumericAndBranch(left, right); 1637 return new(zone()) LCompareNumericAndBranch(left, right);
1636 } else { 1638 } else {
1637 ASSERT(r.IsDouble()); 1639 ASSERT(r.IsDouble());
1638 ASSERT(instr->left()->representation().IsDouble()); 1640 ASSERT(instr->left()->representation().IsDouble());
(...skipping 884 matching lines...) Expand 10 before | Expand all | Expand 10 after
2523 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) { 2525 LInstruction* LChunkBuilder::DoLoadFieldByIndex(HLoadFieldByIndex* instr) {
2524 LOperand* object = UseRegister(instr->object()); 2526 LOperand* object = UseRegister(instr->object());
2525 LOperand* index = UseRegister(instr->index()); 2527 LOperand* index = UseRegister(instr->index());
2526 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index); 2528 LLoadFieldByIndex* load = new(zone()) LLoadFieldByIndex(object, index);
2527 LInstruction* result = DefineSameAsFirst(load); 2529 LInstruction* result = DefineSameAsFirst(load);
2528 return AssignPointerMap(result); 2530 return AssignPointerMap(result);
2529 } 2531 }
2530 2532
2531 2533
2532 } } // namespace v8::internal 2534 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.cc ('k') | src/x64/lithium-x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698