v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
bitcast-elider.h
Go to the documentation of this file.
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_BACKEND_BITCAST_ELIDER_H_
6#define V8_COMPILER_BACKEND_BITCAST_ELIDER_H_
7
9#include "src/compiler/node.h"
10#include "src/zone/zone.h"
11
12namespace v8 {
13namespace internal {
14namespace compiler {
15
16class TFGraph;
17
18// Elide all the Bitcast and TruncateInt64ToInt32 nodes which are required by
19// MachineGraphVerifier. This avoid generating redundant move instructions in
20// instruction selection phase.
22 public:
23 BitcastElider(Zone* zone, TFGraph* graph, bool is_builtin);
24 ~BitcastElider() = default;
25
26 void Reduce();
27
28 void Enqueue(Node* node);
29 void Revisit(Node* node);
30 void VisitNode(Node* node);
31 void ProcessGraph();
32
33 private:
38};
39
40} // namespace compiler
41} // namespace internal
42} // namespace v8
43
44#endif // V8_COMPILER_BACKEND_BITCAST_ELIDER_H_
BitcastElider(Zone *zone, TFGraph *graph, bool is_builtin)