LLVM
22.0.0git
include
llvm
Transforms
Vectorize
SandboxVectorizer
Passes
TransactionAcceptOrRevert.h
Go to the documentation of this file.
1
//===- TransactionAcceptOrRevert.h ------------------------------*- C++ -*-===//
2
//
3
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4
// See https://llvm.org/LICENSE.txt for license information.
5
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6
//
7
//===----------------------------------------------------------------------===//
8
//
9
// This is a region pass that checks the region cost before/after vectorization
10
// and accepts the state of Sandbox IR if the cost is better, or otherwise
11
// reverts it.
12
//
13
14
#ifndef LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_TRANSACTIONACCEPTORREVERT_H
15
#define LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_TRANSACTIONACCEPTORREVERT_H
16
17
#include "
llvm/SandboxIR/Pass.h
"
18
#include "
llvm/SandboxIR/Region.h
"
19
20
namespace
llvm::sandboxir
{
21
22
class
TransactionAcceptOrRevert
:
public
RegionPass
{
23
public
:
24
TransactionAcceptOrRevert
() :
RegionPass
(
"tr-accept-or-revert"
) {}
25
bool
runOnRegion
(
Region
&Rgn,
const
Analyses
&
A
)
final
;
26
};
27
28
}
// namespace llvm::sandboxir
29
30
#endif
// LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_TRANSACTIONACCEPTORREVERT_H
A
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
Region.h
Pass.h
llvm::sandboxir::Analyses
Definition:
Pass.h:26
llvm::sandboxir::RegionPass
A pass that runs on a sandbox::Region.
Definition:
Pass.h:84
llvm::sandboxir::Region
The main job of the Region is to point to new instructions generated by vectorization passes.
Definition:
Region.h:96
llvm::sandboxir::TransactionAcceptOrRevert
Definition:
TransactionAcceptOrRevert.h:22
llvm::sandboxir::TransactionAcceptOrRevert::TransactionAcceptOrRevert
TransactionAcceptOrRevert()
Definition:
TransactionAcceptOrRevert.h:24
llvm::sandboxir::TransactionAcceptOrRevert::runOnRegion
bool runOnRegion(Region &Rgn, const Analyses &A) final
\Returns true if it modifies R.
Definition:
TransactionAcceptOrRevert.cpp:22
llvm::sandboxir
Definition:
Argument.h:15
Generated on Wed Sep 3 2025 02:02:49 for LLVM by
1.9.6