LLVM 23.0.0git
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"
19
20namespace llvm::sandboxir {
21
23public:
25 : RegionPass("tr-accept-or-revert") {
26 assert(AuxArg.empty() && "This pass ignores aux arg!");
27 }
28 bool runOnRegion(Region &Rgn, const Analyses &A) final;
29};
30
31} // namespace llvm::sandboxir
32
33#endif // LLVM_TRANSFORMS_VECTORIZE_SANDBOXVECTORIZER_PASSES_TRANSACTIONACCEPTORREVERT_H
assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")
static GCRegistry::Add< ErlangGC > A("erlang", "erlang-compatible garbage collector")
#define LLVM_ABI
Definition Compiler.h:215
Represent a constant reference to a string, i.e.
Definition StringRef.h:56
constexpr bool empty() const
Check if the string is empty.
Definition StringRef.h:141
RegionPass(StringRef Name)
Name can't contain any spaces or start with '-'.
Definition Pass.h:87