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

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

Issue 6009010: Move first_artificial_register_ initialization to the right place. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 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 | 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 2010 the V8 project authors. All rights reserved. 1 // Copyright 2010 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 744 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 return; 755 return;
756 } 756 }
757 } 757 }
758 } 758 }
759 } 759 }
760 move->AddMove(from, to); 760 move->AddMove(from, to);
761 } 761 }
762 762
763 763
764 void LAllocator::MeetRegisterConstraints(HBasicBlock* block) { 764 void LAllocator::MeetRegisterConstraints(HBasicBlock* block) {
765 first_artificial_register_ = next_virtual_register_;
766 int start = block->first_instruction_index(); 765 int start = block->first_instruction_index();
767 int end = block->last_instruction_index(); 766 int end = block->last_instruction_index();
768 for (int i = start; i <= end; ++i) { 767 for (int i = start; i <= end; ++i) {
769 if (chunk_->IsGapAt(i)) { 768 if (chunk_->IsGapAt(i)) {
770 InstructionSummary* summary = NULL; 769 InstructionSummary* summary = NULL;
771 InstructionSummary* prev_summary = NULL; 770 InstructionSummary* prev_summary = NULL;
772 if (i < end) summary = GetSummary(i + 1); 771 if (i < end) summary = GetSummary(i + 1);
773 if (i > start) prev_summary = GetSummary(i - 1); 772 if (i > start) prev_summary = GetSummary(i - 1);
774 MeetConstraintsBetween(prev_summary, summary, i); 773 MeetConstraintsBetween(prev_summary, summary, i);
775 } 774 }
(...skipping 260 matching lines...) Expand 10 before | Expand all | Expand 10 after
1036 AllocateDoubleRegisters(); 1035 AllocateDoubleRegisters();
1037 PopulatePointerMaps(); 1036 PopulatePointerMaps();
1038 if (has_osr_entry_) ProcessOsrEntry(); 1037 if (has_osr_entry_) ProcessOsrEntry();
1039 ConnectRanges(); 1038 ConnectRanges();
1040 ResolveControlFlow(); 1039 ResolveControlFlow();
1041 } 1040 }
1042 1041
1043 1042
1044 void LAllocator::MeetRegisterConstraints() { 1043 void LAllocator::MeetRegisterConstraints() {
1045 HPhase phase("Register constraints", chunk()); 1044 HPhase phase("Register constraints", chunk());
1045 first_artificial_register_ = next_virtual_register_;
1046 const ZoneList<HBasicBlock*>* blocks = graph()->blocks(); 1046 const ZoneList<HBasicBlock*>* blocks = graph()->blocks();
1047 for (int i = 0; i < blocks->length(); ++i) { 1047 for (int i = 0; i < blocks->length(); ++i) {
1048 HBasicBlock* block = blocks->at(i); 1048 HBasicBlock* block = blocks->at(i);
1049 MeetRegisterConstraints(block); 1049 MeetRegisterConstraints(block);
1050 } 1050 }
1051 } 1051 }
1052 1052
1053 1053
1054 void LAllocator::ResolvePhis() { 1054 void LAllocator::ResolvePhis() {
1055 HPhase phase("Resolve phis", chunk()); 1055 HPhase phase("Resolve phis", chunk());
(...skipping 1064 matching lines...) Expand 10 before | Expand all | Expand 10 after
2120 LiveRange* current = live_ranges()->at(i); 2120 LiveRange* current = live_ranges()->at(i);
2121 if (current != NULL) current->Verify(); 2121 if (current != NULL) current->Verify();
2122 } 2122 }
2123 } 2123 }
2124 2124
2125 2125
2126 #endif 2126 #endif
2127 2127
2128 2128
2129 } } // namespace v8::internal 2129 } } // namespace v8::internal
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698