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

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

Issue 6541024: Adjust pointer maps for branches when connecting live ranges. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 9 years, 10 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 1080 matching lines...) Expand 10 before | Expand all | Expand 10 after
1091 if (pred_cover != cur_cover) { 1091 if (pred_cover != cur_cover) {
1092 LOperand* pred_op = pred_cover->CreateAssignedOperand(); 1092 LOperand* pred_op = pred_cover->CreateAssignedOperand();
1093 LOperand* cur_op = cur_cover->CreateAssignedOperand(); 1093 LOperand* cur_op = cur_cover->CreateAssignedOperand();
1094 if (!pred_op->Equals(cur_op)) { 1094 if (!pred_op->Equals(cur_op)) {
1095 LGap* gap = NULL; 1095 LGap* gap = NULL;
1096 if (block->predecessors()->length() == 1) { 1096 if (block->predecessors()->length() == 1) {
1097 gap = GapAt(block->first_instruction_index()); 1097 gap = GapAt(block->first_instruction_index());
1098 } else { 1098 } else {
1099 ASSERT(pred->end()->SecondSuccessor() == NULL); 1099 ASSERT(pred->end()->SecondSuccessor() == NULL);
1100 gap = GetLastGap(pred); 1100 gap = GetLastGap(pred);
1101
1102 // We are going to insert mov from one live-range to another before the
1103 // branch instruction. Some branch instructions (e.g. loops' back edges)
1104 // can potentially cause a GC so they have a pointer map.
1105 // By insterting a move we essentially create a copy of a
1106 // value which is invisible to PopulatePointerMaps(), because we store
1107 // it into a location different from the operand of a live range
1108 // covering a branch instruction.
1109 // Thus we need to manually record a pointer.
1110 if (HasTaggedValue(range->id())) {
1111 LInstruction* branch = InstructionAt(pred->last_instruction_index());
1112 if (branch->HasPointerMap()) {
1113 branch->pointer_map()->RecordPointer(cur_op);
1114 }
1115 }
1101 } 1116 }
1102 gap->GetOrCreateParallelMove(LGap::START)->AddMove(pred_op, cur_op); 1117 gap->GetOrCreateParallelMove(LGap::START)->AddMove(pred_op, cur_op);
1103 } 1118 }
1104 } 1119 }
1105 } 1120 }
1106 1121
1107 1122
1108 LParallelMove* LAllocator::GetConnectingParallelMove(LifetimePosition pos) { 1123 LParallelMove* LAllocator::GetConnectingParallelMove(LifetimePosition pos) {
1109 int index = pos.InstructionIndex(); 1124 int index = pos.InstructionIndex();
1110 if (IsGapAt(index)) { 1125 if (IsGapAt(index)) {
(...skipping 963 matching lines...) Expand 10 before | Expand all | Expand 10 after
2074 LiveRange* current = live_ranges()->at(i); 2089 LiveRange* current = live_ranges()->at(i);
2075 if (current != NULL) current->Verify(); 2090 if (current != NULL) current->Verify();
2076 } 2091 }
2077 } 2092 }
2078 2093
2079 2094
2080 #endif 2095 #endif
2081 2096
2082 2097
2083 } } // namespace v8::internal 2098 } } // 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