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

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

Issue 9207006: Improve register allocation for Lithium representation changes on ARM... (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 8 years, 11 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 | « no previous file | src/arm/lithium-codegen-arm.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 1607 matching lines...) Expand 10 before | Expand all | Expand 10 after
1618 LInstruction* LChunkBuilder::DoChange(HChange* instr) { 1618 LInstruction* LChunkBuilder::DoChange(HChange* instr) {
1619 Representation from = instr->from(); 1619 Representation from = instr->from();
1620 Representation to = instr->to(); 1620 Representation to = instr->to();
1621 if (from.IsTagged()) { 1621 if (from.IsTagged()) {
1622 if (to.IsDouble()) { 1622 if (to.IsDouble()) {
1623 LOperand* value = UseRegister(instr->value()); 1623 LOperand* value = UseRegister(instr->value());
1624 LNumberUntagD* res = new LNumberUntagD(value); 1624 LNumberUntagD* res = new LNumberUntagD(value);
1625 return AssignEnvironment(DefineAsRegister(res)); 1625 return AssignEnvironment(DefineAsRegister(res));
1626 } else { 1626 } else {
1627 ASSERT(to.IsInteger32()); 1627 ASSERT(to.IsInteger32());
1628 LOperand* value = UseRegister(instr->value()); 1628 LOperand* value = UseRegisterAtStart(instr->value());
1629 bool needs_check = !instr->value()->type().IsSmi(); 1629 bool needs_check = !instr->value()->type().IsSmi();
1630 LInstruction* res = NULL; 1630 LInstruction* res = NULL;
1631 if (!needs_check) { 1631 if (!needs_check) {
1632 res = DefineSameAsFirst(new LSmiUntag(value, needs_check)); 1632 res = DefineAsRegister(new LSmiUntag(value, needs_check));
1633 } else { 1633 } else {
1634 LOperand* temp1 = TempRegister(); 1634 LOperand* temp1 = TempRegister();
1635 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister() 1635 LOperand* temp2 = instr->CanTruncateToInt32() ? TempRegister()
1636 : NULL; 1636 : NULL;
1637 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d11) 1637 LOperand* temp3 = instr->CanTruncateToInt32() ? FixedTemp(d11)
1638 : NULL; 1638 : NULL;
1639 res = DefineSameAsFirst(new LTaggedToI(value, temp1, temp2, temp3)); 1639 res = DefineSameAsFirst(new LTaggedToI(value, temp1, temp2, temp3));
1640 res = AssignEnvironment(res); 1640 res = AssignEnvironment(res);
1641 } 1641 }
1642 return res; 1642 return res;
(...skipping 15 matching lines...) Expand all
1658 LOperand* value = UseRegister(instr->value()); 1658 LOperand* value = UseRegister(instr->value());
1659 LDoubleToI* res = 1659 LDoubleToI* res =
1660 new LDoubleToI(value, 1660 new LDoubleToI(value,
1661 TempRegister(), 1661 TempRegister(),
1662 instr->CanTruncateToInt32() ? TempRegister() : NULL); 1662 instr->CanTruncateToInt32() ? TempRegister() : NULL);
1663 return AssignEnvironment(DefineAsRegister(res)); 1663 return AssignEnvironment(DefineAsRegister(res));
1664 } 1664 }
1665 } else if (from.IsInteger32()) { 1665 } else if (from.IsInteger32()) {
1666 if (to.IsTagged()) { 1666 if (to.IsTagged()) {
1667 HValue* val = instr->value(); 1667 HValue* val = instr->value();
1668 LOperand* value = UseRegister(val); 1668 LOperand* value = UseRegisterAtStart(val);
1669 if (val->HasRange() && val->range()->IsInSmiRange()) { 1669 if (val->HasRange() && val->range()->IsInSmiRange()) {
1670 return DefineSameAsFirst(new LSmiTag(value)); 1670 return DefineAsRegister(new LSmiTag(value));
1671 } else { 1671 } else {
1672 LNumberTagI* result = new LNumberTagI(value); 1672 LNumberTagI* result = new LNumberTagI(value);
1673 return AssignEnvironment(AssignPointerMap(DefineSameAsFirst(result))); 1673 return AssignEnvironment(AssignPointerMap(DefineAsRegister(result)));
1674 } 1674 }
1675 } else { 1675 } else {
1676 ASSERT(to.IsDouble()); 1676 ASSERT(to.IsDouble());
1677 LOperand* value = Use(instr->value()); 1677 LOperand* value = Use(instr->value());
1678 return DefineAsRegister(new LInteger32ToDouble(value)); 1678 return DefineAsRegister(new LInteger32ToDouble(value));
1679 } 1679 }
1680 } 1680 }
1681 UNREACHABLE(); 1681 UNREACHABLE();
1682 return NULL; 1682 return NULL;
1683 } 1683 }
(...skipping 578 matching lines...) Expand 10 before | Expand all | Expand 10 after
2262 2262
2263 LInstruction* LChunkBuilder::DoIn(HIn* instr) { 2263 LInstruction* LChunkBuilder::DoIn(HIn* instr) {
2264 LOperand* key = UseRegisterAtStart(instr->key()); 2264 LOperand* key = UseRegisterAtStart(instr->key());
2265 LOperand* object = UseRegisterAtStart(instr->object()); 2265 LOperand* object = UseRegisterAtStart(instr->object());
2266 LIn* result = new LIn(key, object); 2266 LIn* result = new LIn(key, object);
2267 return MarkAsCall(DefineFixed(result, r0), instr); 2267 return MarkAsCall(DefineFixed(result, r0), instr);
2268 } 2268 }
2269 2269
2270 2270
2271 } } // namespace v8::internal 2271 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698