MLIR  17.0.0git
Namespaces | Macros | Functions
LegalizeForExport.cpp File Reference
#include "mlir/Dialect/LLVMIR/Transforms/LegalizeForExport.h"
#include "mlir/Dialect/LLVMIR/LLVMDialect.h"
#include "mlir/IR/Block.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/Pass/Pass.h"
#include "mlir/Dialect/LLVMIR/Transforms/Passes.h.inc"
+ Include dependency graph for LegalizeForExport.cpp:

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::LLVM
 

Macros

#define GEN_PASS_DEF_LLVMLEGALIZEFOREXPORT
 

Functions

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. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_LLVMLEGALIZEFOREXPORT

#define GEN_PASS_DEF_LLVMLEGALIZEFOREXPORT

Definition at line 19 of file LegalizeForExport.cpp.

Function Documentation

◆ ensureDistinctSuccessors()

static 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::create(), mlir::OpBuilder::createBlock(), mlir::Block::empty(), mlir::Block::getArguments(), mlir::Block::getNumArguments(), mlir::Block::getParent(), mlir::Block::getSuccessor(), mlir::Block::getTerminator(), mlir::Operation::mightHaveTrait(), and mlir::Block::push_back().