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

Side by Side Diff: src/compiler/greedy-allocator.h

Issue 1301393012: [turbofan] Split before loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 3 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
« no previous file with comments | « no previous file | src/compiler/greedy-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 2015 the V8 project authors. All rights reserved. 1 // Copyright 2015 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef V8_GREEDY_ALLOCATOR_H_ 5 #ifndef V8_GREEDY_ALLOCATOR_H_
6 #define V8_GREEDY_ALLOCATOR_H_ 6 #define V8_GREEDY_ALLOCATOR_H_
7 7
8 #include "src/compiler/coalesced-live-ranges.h" 8 #include "src/compiler/coalesced-live-ranges.h"
9 #include "src/compiler/register-allocator.h" 9 #include "src/compiler/register-allocator.h"
10 #include "src/zone-containers.h" 10 #include "src/zone-containers.h"
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
125 // This is the extension point for splitting heuristics. 125 // This is the extension point for splitting heuristics.
126 void SplitOrSpillBlockedRange(LiveRange* range); 126 void SplitOrSpillBlockedRange(LiveRange* range);
127 127
128 // Find a good position where to fill, after a range was spilled after a call. 128 // Find a good position where to fill, after a range was spilled after a call.
129 LifetimePosition FindSplitPositionAfterCall(const LiveRange* range, 129 LifetimePosition FindSplitPositionAfterCall(const LiveRange* range,
130 int call_index); 130 int call_index);
131 // Split a range around all calls it passes over. Returns true if any changes 131 // Split a range around all calls it passes over. Returns true if any changes
132 // were made, or false if no calls were found. 132 // were made, or false if no calls were found.
133 bool TrySplitAroundCalls(LiveRange* range); 133 bool TrySplitAroundCalls(LiveRange* range);
134 134
135 // Find a split position at the outmost loop.
136 LifetimePosition FindSplitPositionBeforeLoops(LiveRange* range);
137
135 // Finds the first call instruction in the path of this range. Splits before 138 // Finds the first call instruction in the path of this range. Splits before
136 // and requeues that segment (if any), spills the section over the call, and 139 // and requeues that segment (if any), spills the section over the call, and
137 // returns the section after the call. The return is: 140 // returns the section after the call. The return is:
138 // - same range, if no call was found 141 // - same range, if no call was found
139 // - nullptr, if the range finished at the call and there's no "after the 142 // - nullptr, if the range finished at the call and there's no "after the
140 // call" portion. 143 // call" portion.
141 // - the portion after the call. 144 // - the portion after the call.
142 LiveRange* GetRemainderAfterSplittingAroundFirstCall(LiveRange* range); 145 LiveRange* GetRemainderAfterSplittingAroundFirstCall(LiveRange* range);
143 146
144 // Necessary heuristic: spill when all else failed. 147 // Necessary heuristic: spill when all else failed.
145 void SpillRangeAsLastResort(LiveRange* range); 148 void SpillRangeAsLastResort(LiveRange* range);
146 149
147 void AssignRangeToRegister(int reg_id, LiveRange* range); 150 void AssignRangeToRegister(int reg_id, LiveRange* range);
148 151
149 Zone* local_zone_; 152 Zone* local_zone_;
150 ZoneVector<CoalescedLiveRanges*> allocations_; 153 ZoneVector<CoalescedLiveRanges*> allocations_;
151 AllocationScheduler scheduler_; 154 AllocationScheduler scheduler_;
152 DISALLOW_COPY_AND_ASSIGN(GreedyAllocator); 155 DISALLOW_COPY_AND_ASSIGN(GreedyAllocator);
153 }; 156 };
154 } // namespace compiler 157 } // namespace compiler
155 } // namespace internal 158 } // namespace internal
156 } // namespace v8 159 } // namespace v8
157 #endif // V8_GREEDY_ALLOCATOR_H_ 160 #endif // V8_GREEDY_ALLOCATOR_H_
OLDNEW
« no previous file with comments | « no previous file | src/compiler/greedy-allocator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698