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

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

Issue 6873106: Revert r7665. (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/ia32/lithium-ia32.h ('k') | src/lithium-allocator.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 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
126 template<typename T, int N> 126 template<typename T, int N>
127 void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) { 127 void OperandContainer<T, N>::PrintOperandsTo(StringStream* stream) {
128 for (int i = 0; i < N; i++) { 128 for (int i = 0; i < N; i++) {
129 if (i > 0) stream->Add(" "); 129 if (i > 0) stream->Add(" ");
130 elems_[i]->PrintTo(stream); 130 elems_[i]->PrintTo(stream);
131 } 131 }
132 } 132 }
133 133
134 134
135 void LLabel::PrintDataTo(StringStream* stream) { 135 void LLabel::PrintDataTo(StringStream* stream) {
136 LGap::PrintDataTo(stream);
136 LLabel* rep = replacement(); 137 LLabel* rep = replacement();
137 if (rep != NULL) { 138 if (rep != NULL) {
138 stream->Add(" Dead block replaced with B%d", rep->block_id()); 139 stream->Add(" Dead block replaced with B%d", rep->block_id());
139 } 140 }
140 } 141 }
141 142
142 143
143 bool LGap::IsRedundant() const { 144 bool LGap::IsRedundant() const {
144 for (int i = 0; i < 4; i++) { 145 for (int i = 0; i < 4; i++) {
145 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) { 146 if (parallel_moves_[i] != NULL && !parallel_moves_[i]->IsRedundant()) {
146 return false; 147 return false;
147 } 148 }
148 } 149 }
150
149 return true; 151 return true;
150 } 152 }
151 153
152 154
153 void LGap::PrintDataTo(StringStream* stream) { 155 void LGap::PrintDataTo(StringStream* stream) {
154 for (int i = 0; i < 4; i++) { 156 for (int i = 0; i < 4; i++) {
155 stream->Add("("); 157 stream->Add("(");
156 if (parallel_moves_[i] != NULL) { 158 if (parallel_moves_[i] != NULL) {
157 parallel_moves_[i]->PrintDataTo(stream); 159 parallel_moves_[i]->PrintDataTo(stream);
158 } 160 }
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 HBasicBlock* block = graph()->blocks()->at(i); 381 HBasicBlock* block = graph()->blocks()->at(i);
380 int first = block->first_instruction_index(); 382 int first = block->first_instruction_index();
381 int last = block->last_instruction_index(); 383 int last = block->last_instruction_index();
382 LInstruction* first_instr = instructions()->at(first); 384 LInstruction* first_instr = instructions()->at(first);
383 LInstruction* last_instr = instructions()->at(last); 385 LInstruction* last_instr = instructions()->at(last);
384 386
385 LLabel* label = LLabel::cast(first_instr); 387 LLabel* label = LLabel::cast(first_instr);
386 if (last_instr->IsGoto()) { 388 if (last_instr->IsGoto()) {
387 LGoto* goto_instr = LGoto::cast(last_instr); 389 LGoto* goto_instr = LGoto::cast(last_instr);
388 if (!goto_instr->include_stack_check() && 390 if (!goto_instr->include_stack_check() &&
391 label->IsRedundant() &&
389 !label->is_loop_header()) { 392 !label->is_loop_header()) {
390 bool can_eliminate = true; 393 bool can_eliminate = true;
391 for (int i = first + 1; i < last && can_eliminate; ++i) { 394 for (int i = first + 1; i < last && can_eliminate; ++i) {
392 LInstruction* cur = instructions()->at(i); 395 LInstruction* cur = instructions()->at(i);
393 if (cur->IsGap()) { 396 if (cur->IsGap()) {
394 LGap* gap = LGap::cast(cur); 397 LGap* gap = LGap::cast(cur);
395 if (!gap->IsRedundant()) { 398 if (!gap->IsRedundant()) {
396 can_eliminate = false; 399 can_eliminate = false;
397 } 400 }
398 } else { 401 } else {
(...skipping 1795 matching lines...) Expand 10 before | Expand all | Expand 10 after
2194 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) { 2197 LInstruction* LChunkBuilder::DoLeaveInlined(HLeaveInlined* instr) {
2195 HEnvironment* outer = current_block_->last_environment()->outer(); 2198 HEnvironment* outer = current_block_->last_environment()->outer();
2196 current_block_->UpdateEnvironment(outer); 2199 current_block_->UpdateEnvironment(outer);
2197 return NULL; 2200 return NULL;
2198 } 2201 }
2199 2202
2200 2203
2201 } } // namespace v8::internal 2204 } } // namespace v8::internal
2202 2205
2203 #endif // V8_TARGET_ARCH_IA32 2206 #endif // V8_TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « src/ia32/lithium-ia32.h ('k') | src/lithium-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698