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

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

Issue 18773003: ARM: Add support for temp double registers in Crankshaft. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 7 years, 5 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/lithium.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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 LOperand* operand, 60 LOperand* operand,
61 LOperand* hint) 61 LOperand* hint)
62 : operand_(operand), 62 : operand_(operand),
63 hint_(hint), 63 hint_(hint),
64 pos_(pos), 64 pos_(pos),
65 next_(NULL), 65 next_(NULL),
66 requires_reg_(false), 66 requires_reg_(false),
67 register_beneficial_(true) { 67 register_beneficial_(true) {
68 if (operand_ != NULL && operand_->IsUnallocated()) { 68 if (operand_ != NULL && operand_->IsUnallocated()) {
69 LUnallocated* unalloc = LUnallocated::cast(operand_); 69 LUnallocated* unalloc = LUnallocated::cast(operand_);
70 requires_reg_ = unalloc->HasRegisterPolicy(); 70 requires_reg_ = unalloc->HasRegisterPolicy() ||
71 unalloc->HasTempDoubleRegisterPolicy();
71 register_beneficial_ = !unalloc->HasAnyPolicy(); 72 register_beneficial_ = !unalloc->HasAnyPolicy();
72 } 73 }
73 ASSERT(pos_.IsValid()); 74 ASSERT(pos_.IsValid());
74 } 75 }
75 76
76 77
77 bool UsePosition::HasHint() const { 78 bool UsePosition::HasHint() const {
78 return hint_ != NULL && !hint_->IsUnallocated(); 79 return hint_ != NULL && !hint_->IsUnallocated();
79 } 80 }
80 81
(...skipping 933 matching lines...) Expand 10 before | Expand all | Expand 10 after
1014 if (temp->IsRegister()) continue; 1015 if (temp->IsRegister()) continue;
1015 if (temp->IsUnallocated()) { 1016 if (temp->IsUnallocated()) {
1016 LUnallocated* temp_unalloc = LUnallocated::cast(temp); 1017 LUnallocated* temp_unalloc = LUnallocated::cast(temp);
1017 if (temp_unalloc->HasFixedPolicy()) { 1018 if (temp_unalloc->HasFixedPolicy()) {
1018 continue; 1019 continue;
1019 } 1020 }
1020 } 1021 }
1021 } 1022 }
1022 Use(block_start_position, curr_position.InstructionEnd(), temp, NULL); 1023 Use(block_start_position, curr_position.InstructionEnd(), temp, NULL);
1023 Define(curr_position, temp, NULL); 1024 Define(curr_position, temp, NULL);
1025 if (temp->IsUnallocated()) {
1026 LUnallocated* temp_unalloc = LUnallocated::cast(temp);
1027 if (temp_unalloc->HasTempDoubleRegisterPolicy()) {
1028 double_artificial_registers_.Add(
1029 temp_unalloc->virtual_register() - first_artificial_register_,
1030 zone());
1031 }
1032 }
1024 } 1033 }
1025 } 1034 }
1026 } 1035 }
1027 1036
1028 index = index - 1; 1037 index = index - 1;
1029 } 1038 }
1030 } 1039 }
1031 1040
1032 1041
1033 void LAllocator::ResolvePhis(HBasicBlock* block) { 1042 void LAllocator::ResolvePhis(HBasicBlock* block) {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
1104 if (!AllocationOk()) return false; 1113 if (!AllocationOk()) return false;
1105 PopulatePointerMaps(); 1114 PopulatePointerMaps();
1106 ConnectRanges(); 1115 ConnectRanges();
1107 ResolveControlFlow(); 1116 ResolveControlFlow();
1108 return true; 1117 return true;
1109 } 1118 }
1110 1119
1111 1120
1112 void LAllocator::MeetRegisterConstraints() { 1121 void LAllocator::MeetRegisterConstraints() {
1113 LAllocatorPhase phase("L_Register constraints", this); 1122 LAllocatorPhase phase("L_Register constraints", this);
1114 first_artificial_register_ = next_virtual_register_;
1115 const ZoneList<HBasicBlock*>* blocks = graph_->blocks(); 1123 const ZoneList<HBasicBlock*>* blocks = graph_->blocks();
1116 for (int i = 0; i < blocks->length(); ++i) { 1124 for (int i = 0; i < blocks->length(); ++i) {
1117 HBasicBlock* block = blocks->at(i); 1125 HBasicBlock* block = blocks->at(i);
1118 MeetRegisterConstraints(block); 1126 MeetRegisterConstraints(block);
1119 if (!AllocationOk()) return; 1127 if (!AllocationOk()) return;
1120 } 1128 }
1121 } 1129 }
1122 1130
1123 1131
1124 void LAllocator::ResolvePhis() { 1132 void LAllocator::ResolvePhis() {
(...skipping 1072 matching lines...) Expand 10 before | Expand all | Expand 10 after
2197 isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_); 2205 isolate()->GetHTracer()->TraceLiveRanges(name(), allocator_);
2198 } 2206 }
2199 2207
2200 #ifdef DEBUG 2208 #ifdef DEBUG
2201 if (allocator_ != NULL) allocator_->Verify(); 2209 if (allocator_ != NULL) allocator_->Verify();
2202 #endif 2210 #endif
2203 } 2211 }
2204 2212
2205 2213
2206 } } // namespace v8::internal 2214 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/lithium.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698