v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
jump-threading.h
Go to the documentation of this file.
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_BACKEND_JUMP_THREADING_H_
6
#define V8_COMPILER_BACKEND_JUMP_THREADING_H_
7
8
#include "
src/compiler/backend/instruction.h
"
9
10
namespace
v8
{
11
namespace
internal
{
12
namespace
compiler {
13
14
// Forwards jumps to empty basic blocks that end with a second jump to the
15
// destination of the second jump, transitively.
16
class
V8_EXPORT_PRIVATE
JumpThreading
{
17
public
:
18
// Compute the forwarding map of basic blocks to their ultimate destination.
19
// Returns {true} if there is at least one block that is forwarded.
20
static
bool
ComputeForwarding(
Zone
* local_zone,
ZoneVector<RpoNumber>
*
result
,
21
InstructionSequence
* code,
bool
frame_at_start);
22
23
// Rewrite the instructions to forward jumps and branches.
24
// May also negate some branches.
25
static
void
ApplyForwarding(
Zone
* local_zone,
26
ZoneVector<RpoNumber>
const
& forwarding,
27
InstructionSequence
* code);
28
};
29
30
}
// namespace compiler
31
}
// namespace internal
32
}
// namespace v8
33
34
#endif
// V8_COMPILER_BACKEND_JUMP_THREADING_H_
v8::internal::ZoneVector
Definition
zone-containers.h:53
v8::internal::Zone
Definition
zone.h:43
v8::internal::compiler::InstructionSequence
Definition
instruction.h:1831
v8::internal::compiler::JumpThreading
Definition
jump-threading.h:16
instruction.h
result
ZoneVector< RpoNumber > & result
Definition
jump-threading.cc:21
v8::internal::internal
internal
Definition
wasm-objects-inl.h:458
v8
Definition
api-arguments-inl.h:19
V8_EXPORT_PRIVATE
#define V8_EXPORT_PRIVATE
Definition
macros.h:460
src
compiler
backend
jump-threading.h
Generated on Sun Apr 6 2025 21:08:51 for v8 by
1.12.0