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

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

Issue 6873075: Lithium LLabel instruction are no longer used as gap instructions. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge/
Patch Set: '' Created 9 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/arm/lithium-arm.h ('k') | 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 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after
124 template<typename T, int N> 124 template<typename T, int N>
125 void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) { 125 void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
126 for (int i = 0; i < N; i++) { 126 for (int i = 0; i < N; i++) {
127 if (i > 0) stream->Add(" "); 127 if (i > 0) stream->Add(" ");
128 elems_[i]->PrintTo(stream); 128 elems_[i]->PrintTo(stream);
129 } 129 }
130 } 130 }
131 131
132 132
133 void LLabel::PrintDataTo(StringStream* stream) { 133 void LLabel::PrintDataTo(StringStream* stream) {
134 LGap::PrintDataTo(stream);
135 LLabel* rep = replacement(); 134 LLabel* rep = replacement();
136 if (rep != NULL) { 135 if (rep != NULL) {
137 stream->Add(" Dead block replaced with B%d", rep->block_id()); 136 stream->Add(" Dead block replaced with B%d", rep->block_id());
138 } 137 }
139 } 138 }
140 139
141 140
142 bool LGap::IsRedundant() const { 141 bool LGap::IsRedundant() const {
143 for (int i = 0; i < 4; i++) { 142 for (int i = 0; i < 4; i++) {
144 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { 143 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
145 return false; 144 return false;
146 } 145 }
147 } 146 }
148
149 return true; 147 return true;
150 } 148 }
151 149
152 150
153 void LGap::PrintDataTo(StringStream* stream) const { 151 void LGap::PrintDataTo(StringStream* stream) const {
154 for (int i = 0; i < 4; i++) { 152 for (int i = 0; i < 4; i++) {
155 stream->Add("("); 153 stream->Add("(");
156 if (parallel_moves_[i] != NULL) { 154 if (parallel_moves_[i] != NULL) {
157 parallel_moves_[i]->PrintDataTo(stream); 155 parallel_moves_[i]->PrintDataTo(stream);
158 } 156 }
(...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after
423 HBasicBlock* block = graph()->blocks()->at(i); 421 HBasicBlock* block = graph()->blocks()->at(i);
424 int first = block->first_instruction_index(); 422 int first = block->first_instruction_index();
425 int last = block->last_instruction_index(); 423 int last = block->last_instruction_index();
426 LInstruction* first_instr = instructions()->at(first); 424 LInstruction* first_instr = instructions()->at(first);
427 LInstruction* last_instr = instructions()->at(last); 425 LInstruction* last_instr = instructions()->at(last);
428 426
429 LLabel* label = LLabel::cast(first_instr); 427 LLabel* label = LLabel::cast(first_instr);
430 if (last_instr->IsGoto()) { 428 if (last_instr->IsGoto()) {
431 LGoto* goto_instr = LGoto::cast(last_instr); 429 LGoto* goto_instr = LGoto::cast(last_instr);
432 if (!goto_instr->include_stack_check() && 430 if (!goto_instr->include_stack_check() &&
433 label->IsRedundant() &&
434 !label->is_loop_header()) { 431 !label->is_loop_header()) {
435 bool can_eliminate = true; 432 bool can_eliminate = true;
436 for (int i = first + 1; i < last && can_eliminate; ++i) { 433 for (int i = first + 1; i < last && can_eliminate; ++i) {
437 LInstruction* cur = instructions()->at(i); 434 LInstruction* cur = instructions()->at(i);
438 if (cur->IsGap()) { 435 if (cur->IsGap()) {
439 LGap* gap = LGap::cast(cur); 436 LGap* gap = LGap::cast(cur);
440 if (!gap->IsRedundant()) { 437 if (!gap->IsRedundant()) {
441 can_eliminate = false; 438 can_eliminate = false;
442 } 439 }
443 } else { 440 } else {
(...skipping 1688 matching lines...) Expand 10 before | Expand all | Expand 10 after
2132 2129
2133 2130
2134 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2131 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2135 HEnvironment* outer = current_block_->last_environment()->outer(); 2132 HEnvironment* outer = current_block_->last_environment()->outer();
2136 current_block_->UpdateEnvironment(outer); 2133 current_block_->UpdateEnvironment(outer);
2137 return NULL; 2134 return NULL;
2138 } 2135 }
2139 2136
2140 2137
2141 } } // namespace v8::internal 2138 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « src/arm/lithium-arm.h ('k') | src/arm/lithium-codegen-arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698