MLIR  20.0.0git
Functions
Verifier.cpp File Reference
#include "mlir/IR/Verifier.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/Dominance.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/RegionKindInterface.h"
#include "mlir/IR/Threading.h"
#include "llvm/ADT/DenseMapInfoVariant.h"
#include "llvm/ADT/PointerIntPair.h"
#include "llvm/ADT/StringMap.h"
#include "llvm/Support/FormatVariadic.h"
#include "llvm/Support/PrettyStackTrace.h"
#include "llvm/Support/Regex.h"
#include <atomic>
#include <optional>

Go to the source code of this file.

Functions

static bool mayBeValidWithoutTerminator (Block *block)
 Returns true if this block may be valid without terminator. More...
 
static void diagnoseInvalidOperandDominance (Operation &op, unsigned operandNo)
 Emit an error when the specified operand of the specified operation is an invalid use because of dominance properties. More...
 

Function Documentation

◆ diagnoseInvalidOperandDominance()

static void diagnoseInvalidOperandDominance ( Operation op,
unsigned  operandNo 
)
static

Emit an error when the specified operand of the specified operation is an invalid use because of dominance properties.

Attach a note to an in-flight diagnostic that provide more information about where an op operand is defined.

Definition at line 328 of file Verifier.cpp.

References mlir::Region::begin(), diag(), mlir::Operation::emitError(), mlir::get(), mlir::Operation::getBlock(), mlir::Operation::getContext(), mlir::Value::getDefiningOp(), mlir::Operation::getLoc(), mlir::Operation::getOperand(), mlir::Block::getParent(), mlir::Block::getParentOp(), and mlir::Region::isProperAncestor().

◆ mayBeValidWithoutTerminator()

static bool mayBeValidWithoutTerminator ( Block block)
static

Returns true if this block may be valid without terminator.

That is if:

  • it does not have a parent region.
  • Or the parent region have a single block and:
    • This region does not have a parent op.
    • Or the parent op is unregistered.
    • Or the parent op has the NoTerminator trait.

Definition at line 109 of file Verifier.cpp.

References mlir::Block::getParent(), mlir::Block::getParentOp(), and mlir::Operation::mightHaveTrait().