MLIR 22.0.0git
LegalizeForExport.h
Go to the documentation of this file.
1//===- LegalizeForExport.h - Prepare for translation to LLVM IR -*- 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#ifndef MLIR_DIALECT_LLVMIR_TRANSFORMS_LEGALIZEFOREXPORT_H
10#define MLIR_DIALECT_LLVMIR_TRANSFORMS_LEGALIZEFOREXPORT_H
11
12#include <memory>
13
14namespace mlir {
15class Operation;
16class Pass;
17
18namespace LLVM {
19
20#define GEN_PASS_DECL_LLVMLEGALIZEFOREXPORTPASS
21#include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"
22
23/// Make argument-taking successors of each block distinct. PHI nodes in LLVM
24/// IR use the predecessor ID to identify which value to take. They do not
25/// support different values coming from the same predecessor. If a block has
26/// another block as a successor more than once with different values, insert
27/// a new dummy block for LLVM PHI nodes to tell the sources apart.
28void ensureDistinctSuccessors(Operation *op);
29
30} // namespace LLVM
31} // namespace mlir
32
33#endif // MLIR_DIALECT_LLVMIR_TRANSFORMS_LEGALIZEFOREXPORT_H
Operation is the basic unit of execution within MLIR.
Definition Operation.h:88
The abstract base pass class.
Definition Pass.h:51
void ensureDistinctSuccessors(Operation *op)
Make argument-taking successors of each block distinct.
Include the generated interface declarations.