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

Side by Side Diff: src/compiler/typed-optimization.h

Issue 2280673003: [turbofan] Separate typed optimizations from JSTypedLowering. (Closed)
Patch Set: Created 4 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 | « src/compiler/pipeline.cc ('k') | src/compiler/typed-optimization.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 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_TYPED_OPTIMIZATION_H_
Michael Starzinger 2016/08/26 07:52:14 nit: Since this is targetting JS-level nodes, can
Benedikt Meurer 2016/08/26 07:53:58 As discussed offline, we're targetting mostly simp
6 #define V8_COMPILER_TYPED_OPTIMIZATION_H_
7
8 #include "src/base/flags.h"
9 #include "src/compiler/graph-reducer.h"
10
11 namespace v8 {
12 namespace internal {
13
14 // Forward declarations.
15 class CompilationDependencies;
16 class Factory;
17 class Isolate;
18 class TypeCache;
19
20 namespace compiler {
21
22 // Forward declarations.
23 class JSGraph;
24 class SimplifiedOperatorBuilder;
25
26 class TypedOptimization final : public AdvancedReducer {
27 public:
28 // Flags that control the mode of operation.
29 enum Flag {
30 kNoFlags = 0u,
31 kDeoptimizationEnabled = 1u << 0,
32 };
33 typedef base::Flags<Flag> Flags;
34
35 TypedOptimization(Editor* editor, CompilationDependencies* dependencies,
36 Flags flags, JSGraph* jsgraph);
37 ~TypedOptimization();
38
39 Reduction Reduce(Node* node) final;
40
41 private:
42 Reduction ReduceCheckMaps(Node* node);
43 Reduction ReduceCheckString(Node* node);
44 Reduction ReduceLoadField(Node* node);
45 Reduction ReduceNumberRoundop(Node* node);
46 Reduction ReducePhi(Node* node);
47 Reduction ReduceSelect(Node* node);
48
49 CompilationDependencies* dependencies() const { return dependencies_; }
50 Factory* factory() const;
51 Flags flags() const { return flags_; }
52 Graph* graph() const;
53 Isolate* isolate() const;
54 JSGraph* jsgraph() const { return jsgraph_; }
55 SimplifiedOperatorBuilder* simplified() const;
56
57 CompilationDependencies* const dependencies_;
58 Flags const flags_;
59 JSGraph* const jsgraph_;
60 Type* const true_type_;
61 Type* const false_type_;
62 TypeCache const& type_cache_;
63
64 DISALLOW_COPY_AND_ASSIGN(TypedOptimization);
65 };
66
67 DEFINE_OPERATORS_FOR_FLAGS(TypedOptimization::Flags)
68
69 } // namespace compiler
70 } // namespace internal
71 } // namespace v8
72
73 #endif // V8_COMPILER_TYPED_OPTIMIZATION_H_
OLDNEW
« no previous file with comments | « src/compiler/pipeline.cc ('k') | src/compiler/typed-optimization.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698