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
8
#include "
src/compiler/node-marker.h
"
9
#include "
src/compiler/node.h
"
10
#include "
src/zone/zone.h
"
11
12
namespace
v8
{
13
namespace
internal
{
14
namespace
compiler {
15
16
class
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.
21
class
BitcastElider
{
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
:
34
TFGraph
*
const
graph_
;
35
ZoneQueue<Node*>
to_visit_
;
36
NodeMarker<bool>
seen_
;
37
bool
is_builtin_
;
38
};
39
40
}
// namespace compiler
41
}
// namespace internal
42
}
// namespace v8
43
44
#endif
// V8_COMPILER_BACKEND_BITCAST_ELIDER_H_
v8::internal::ZoneQueue
Definition
zone-containers.h:655
v8::internal::Zone
Definition
zone.h:43
v8::internal::compiler::BitcastElider
Definition
bitcast-elider.h:21
v8::internal::compiler::BitcastElider::~BitcastElider
~BitcastElider()=default
v8::internal::compiler::BitcastElider::BitcastElider
BitcastElider(Zone *zone, TFGraph *graph, bool is_builtin)
Definition
bitcast-elider.cc:91
v8::internal::compiler::BitcastElider::ProcessGraph
void ProcessGraph()
Definition
bitcast-elider.cc:82
v8::internal::compiler::BitcastElider::Revisit
void Revisit(Node *node)
Definition
bitcast-elider.cc:62
v8::internal::compiler::BitcastElider::seen_
NodeMarker< bool > seen_
Definition
bitcast-elider.h:36
v8::internal::compiler::BitcastElider::to_visit_
ZoneQueue< Node * > to_visit_
Definition
bitcast-elider.h:35
v8::internal::compiler::BitcastElider::is_builtin_
bool is_builtin_
Definition
bitcast-elider.h:37
v8::internal::compiler::BitcastElider::Reduce
void Reduce()
Definition
bitcast-elider.cc:97
v8::internal::compiler::BitcastElider::VisitNode
void VisitNode(Node *node)
Definition
bitcast-elider.cc:64
v8::internal::compiler::BitcastElider::Enqueue
void Enqueue(Node *node)
Definition
bitcast-elider.cc:56
v8::internal::compiler::BitcastElider::graph_
TFGraph *const graph_
Definition
bitcast-elider.h:34
v8::internal::compiler::NodeMarker
Definition
node-marker.h:60
v8::internal::compiler::Node
Definition
node.h:41
v8::internal::compiler::TFGraph
Definition
turbofan-graph.h:32
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
node-marker.h
node.h
zone.h
src
compiler
backend
bitcast-elider.h
Generated on Sun Apr 6 2025 21:08:51 for v8 by
1.12.0