MLIR 22.0.0git
LegalizeForExport.cpp File Reference
#include "mlir/Dialect/LLVMIR/Transforms/LegalizeForExport.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/Dialect/LLVMIR/Transforms/DIExpressionLegalization.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/Builders.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"

Go to the source code of this file.

Classes

class  mlir::LLVM::impl::LLVMLegalizeForExportPassBase< DerivedT >

Namespaces

namespace  mlir
 Include the generated interface declarations.
namespace  mlir::LLVM
namespace  mlir::LLVM::impl

Macros

#define GEN_PASS_DEF_LLVMLEGALIZEFOREXPORTPASS

Functions

std::unique_ptr<::mlir::Passmlir::LLVM::impl::createLLVMLegalizeForExportPass ()
std::unique_ptr<::mlir::Passmlir::LLVM::createLLVMLegalizeForExportPass ()
static void ensureDistinctSuccessors (Block &bb)
 If the given block has the same successor with different arguments, introduce dummy successor blocks so that all successors of the given block are different.

Macro Definition Documentation

◆ GEN_PASS_DEF_LLVMLEGALIZEFOREXPORTPASS

#define GEN_PASS_DEF_LLVMLEGALIZEFOREXPORTPASS

Definition at line 19 of file LegalizeForExport.cpp.

Function Documentation

◆ ensureDistinctSuccessors()

void ensureDistinctSuccessors ( Block & bb)
static

If the given block has the same successor with different arguments, introduce dummy successor blocks so that all successors of the given block are different.

Definition at line 29 of file LegalizeForExport.cpp.

References mlir::Block::addArgument(), mlir::Block::back(), mlir::OpBuilder::createBlock(), mlir::Block::empty(), mlir::Block::getArguments(), mlir::Block::getNumArguments(), mlir::Block::getParent(), mlir::Block::getSuccessor(), mlir::Block::getTerminator(), and mlir::Operation::mightHaveTrait().

Referenced by mlir::LLVM::ensureDistinctSuccessors().