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

Side by Side Diff: src/compiler/osr.h

Issue 809333002: [turbofan] Implement OSR for outer loops. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 6 years 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
OLDNEW
(Empty)
1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef V8_COMPILER_OSR_H_
6 #define V8_COMPILER_OSR_H_
7
8 #include "src/zone.h"
9
10 namespace v8 {
11 namespace internal {
12
13 class CompilationInfo;
14
15 namespace compiler {
16
17 class Graph;
18 class CommonOperatorBuilder;
19 class Frame;
20 class Linkage;
21
22 // Encapsulates logic relating to OSR compilations as well has handles some
23 // details of the frame layout.
24 class OsrHelper {
25 public:
26 explicit OsrHelper(CompilationInfo* info);
27
28 // Deconstructs the artificial {OsrNormalEntry} and rewrites the graph so
29 // that only the path corresponding to {OsrLoopEntry} remains.
30 void Deconstruct(Graph* graph, CommonOperatorBuilder* common, Zone* tmp_zone);
31
32 // Prepares the frame w.r.t. OSR.
33 void SetupFrame(Frame* frame);
34
35 // Returns the number of unoptimized frame slots for this OSR.
36 size_t UnoptimizedFrameSlots() { return stack_slot_count_; }
37
38 // Returns the environment index of the first stack slot.
39 static int FirstStackSlotIndex(int parameter_count) {
40 // n.b. unlike Crankshaft, TurboFan environments do not contain the context.
41 return 1 + parameter_count; // receiver + params
42 }
43
44 private:
45 size_t parameter_count_;
46 size_t stack_slot_count_;
47 };
48
49 } // namespace compiler
50 } // namespace internal
51 } // namespace v8
52
53 #endif // V8_COMPILER_OSR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698