MLIR  20.0.0git
Functions
SideEffectInterfaces.cpp File Reference
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/IR/SymbolTable.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "mlir/Interfaces/SideEffectInterfaces.cpp.inc"

Go to the source code of this file.

Functions

static bool wouldOpBeTriviallyDeadImpl (Operation *rootOp)
 Internal implementation of mlir::wouldOpBeTriviallyDead that also considers terminator operations as dead if they have no side effects. More...
 
template bool mlir::hasSingleEffect< MemoryEffects::Allocate > (Operation *)
 
template bool mlir::hasSingleEffect< MemoryEffects::Free > (Operation *)
 
template bool mlir::hasSingleEffect< MemoryEffects::Read > (Operation *)
 
template bool mlir::hasSingleEffect< MemoryEffects::Write > (Operation *)
 
template bool mlir::hasSingleEffect< MemoryEffects::Allocate > (Operation *, Value value)
 
template bool mlir::hasSingleEffect< MemoryEffects::Free > (Operation *, Value value)
 
template bool mlir::hasSingleEffect< MemoryEffects::Read > (Operation *, Value value)
 
template bool mlir::hasSingleEffect< MemoryEffects::Write > (Operation *, Value value)
 
template bool mlir::hasSingleEffect< OpOperand *, MemoryEffects::Allocate > (Operation *, OpOperand *)
 
template bool mlir::hasSingleEffect< OpOperand *, MemoryEffects::Free > (Operation *, OpOperand *)
 
template bool mlir::hasSingleEffect< OpOperand *, MemoryEffects::Read > (Operation *, OpOperand *)
 
template bool mlir::hasSingleEffect< OpOperand *, MemoryEffects::Write > (Operation *, OpOperand *)
 
template bool mlir::hasSingleEffect< OpResult, MemoryEffects::Allocate > (Operation *, OpResult)
 
template bool mlir::hasSingleEffect< OpResult, MemoryEffects::Free > (Operation *, OpResult)
 
template bool mlir::hasSingleEffect< OpResult, MemoryEffects::Read > (Operation *, OpResult)
 
template bool mlir::hasSingleEffect< OpResult, MemoryEffects::Write > (Operation *, OpResult)
 
template bool mlir::hasSingleEffect< BlockArgument, MemoryEffects::Allocate > (Operation *, BlockArgument)
 
template bool mlir::hasSingleEffect< BlockArgument, MemoryEffects::Free > (Operation *, BlockArgument)
 
template bool mlir::hasSingleEffect< BlockArgument, MemoryEffects::Read > (Operation *, BlockArgument)
 
template bool mlir::hasSingleEffect< BlockArgument, MemoryEffects::Write > (Operation *, BlockArgument)
 
template bool mlir::hasEffect< MemoryEffects::Allocate > (Operation *)
 
template bool mlir::hasEffect< MemoryEffects::Free > (Operation *)
 
template bool mlir::hasEffect< MemoryEffects::Read > (Operation *)
 
template bool mlir::hasEffect< MemoryEffects::Write > (Operation *)
 
template bool mlir::hasEffect< MemoryEffects::Write, MemoryEffects::Free > (Operation *)
 
template bool mlir::hasEffect< MemoryEffects::Allocate > (Operation *, Value value)
 
template bool mlir::hasEffect< MemoryEffects::Free > (Operation *, Value value)
 
template bool mlir::hasEffect< MemoryEffects::Read > (Operation *, Value value)
 
template bool mlir::hasEffect< MemoryEffects::Write > (Operation *, Value value)
 
template bool mlir::hasEffect< MemoryEffects::Write, MemoryEffects::Free > (Operation *, Value value)
 
template bool mlir::hasEffect< OpOperand *, MemoryEffects::Allocate > (Operation *, OpOperand *)
 
template bool mlir::hasEffect< OpOperand *, MemoryEffects::Free > (Operation *, OpOperand *)
 
template bool mlir::hasEffect< OpOperand *, MemoryEffects::Read > (Operation *, OpOperand *)
 
template bool mlir::hasEffect< OpOperand *, MemoryEffects::Write > (Operation *, OpOperand *)
 
template bool mlir::hasEffect< OpOperand *, MemoryEffects::Write, MemoryEffects::Free > (Operation *, OpOperand *)
 
template bool mlir::hasEffect< OpResult, MemoryEffects::Allocate > (Operation *, OpResult)
 
template bool mlir::hasEffect< OpResult, MemoryEffects::Free > (Operation *, OpResult)
 
template bool mlir::hasEffect< OpResult, MemoryEffects::Read > (Operation *, OpResult)
 
template bool mlir::hasEffect< OpResult, MemoryEffects::Write > (Operation *, OpResult)
 
template bool mlir::hasEffect< OpResult, MemoryEffects::Write, MemoryEffects::Free > (Operation *, OpResult)
 
template bool mlir::hasEffect< BlockArgument, MemoryEffects::Allocate > (Operation *, BlockArgument)
 
template bool mlir::hasEffect< BlockArgument, MemoryEffects::Free > (Operation *, BlockArgument)
 
template bool mlir::hasEffect< BlockArgument, MemoryEffects::Read > (Operation *, BlockArgument)
 
template bool mlir::hasEffect< BlockArgument, MemoryEffects::Write > (Operation *, BlockArgument)
 
template bool mlir::hasEffect< BlockArgument, MemoryEffects::Write, MemoryEffects::Free > (Operation *, BlockArgument)
 

Function Documentation

◆ mlir::hasEffect< BlockArgument, MemoryEffects::Allocate >()

◆ mlir::hasEffect< BlockArgument, MemoryEffects::Free >()

◆ mlir::hasEffect< BlockArgument, MemoryEffects::Read >()

◆ mlir::hasEffect< BlockArgument, MemoryEffects::Write >()

◆ mlir::hasEffect< BlockArgument, MemoryEffects::Write, MemoryEffects::Free >()

◆ mlir::hasEffect< MemoryEffects::Allocate >() [1/2]

◆ mlir::hasEffect< MemoryEffects::Allocate >() [2/2]

template bool mlir::hasEffect< MemoryEffects::Allocate > ( Operation ,
Value  value 
)

◆ mlir::hasEffect< MemoryEffects::Free >() [1/2]

template bool mlir::hasEffect< MemoryEffects::Free > ( Operation )

◆ mlir::hasEffect< MemoryEffects::Free >() [2/2]

template bool mlir::hasEffect< MemoryEffects::Free > ( Operation ,
Value  value 
)

◆ mlir::hasEffect< MemoryEffects::Read >() [1/2]

template bool mlir::hasEffect< MemoryEffects::Read > ( Operation )

◆ mlir::hasEffect< MemoryEffects::Read >() [2/2]

template bool mlir::hasEffect< MemoryEffects::Read > ( Operation ,
Value  value 
)

◆ mlir::hasEffect< MemoryEffects::Write >() [1/2]

◆ mlir::hasEffect< MemoryEffects::Write >() [2/2]

template bool mlir::hasEffect< MemoryEffects::Write > ( Operation ,
Value  value 
)

◆ mlir::hasEffect< MemoryEffects::Write, MemoryEffects::Free >() [1/2]

◆ mlir::hasEffect< MemoryEffects::Write, MemoryEffects::Free >() [2/2]

◆ mlir::hasEffect< OpOperand *, MemoryEffects::Allocate >()

◆ mlir::hasEffect< OpOperand *, MemoryEffects::Free >()

template bool mlir::hasEffect< OpOperand *, MemoryEffects::Free > ( Operation ,
OpOperand  
)

◆ mlir::hasEffect< OpOperand *, MemoryEffects::Read >()

template bool mlir::hasEffect< OpOperand *, MemoryEffects::Read > ( Operation ,
OpOperand  
)

◆ mlir::hasEffect< OpOperand *, MemoryEffects::Write >()

template bool mlir::hasEffect< OpOperand *, MemoryEffects::Write > ( Operation ,
OpOperand  
)

◆ mlir::hasEffect< OpOperand *, MemoryEffects::Write, MemoryEffects::Free >()

◆ mlir::hasEffect< OpResult, MemoryEffects::Allocate >()

◆ mlir::hasEffect< OpResult, MemoryEffects::Free >()

◆ mlir::hasEffect< OpResult, MemoryEffects::Read >()

◆ mlir::hasEffect< OpResult, MemoryEffects::Write >()

◆ mlir::hasEffect< OpResult, MemoryEffects::Write, MemoryEffects::Free >()

◆ mlir::hasSingleEffect< BlockArgument, MemoryEffects::Allocate >()

◆ mlir::hasSingleEffect< BlockArgument, MemoryEffects::Free >()

◆ mlir::hasSingleEffect< BlockArgument, MemoryEffects::Read >()

◆ mlir::hasSingleEffect< BlockArgument, MemoryEffects::Write >()

◆ mlir::hasSingleEffect< MemoryEffects::Allocate >() [1/2]

◆ mlir::hasSingleEffect< MemoryEffects::Allocate >() [2/2]

template bool mlir::hasSingleEffect< MemoryEffects::Allocate > ( Operation ,
Value  value 
)

◆ mlir::hasSingleEffect< MemoryEffects::Free >() [1/2]

◆ mlir::hasSingleEffect< MemoryEffects::Free >() [2/2]

template bool mlir::hasSingleEffect< MemoryEffects::Free > ( Operation ,
Value  value 
)

◆ mlir::hasSingleEffect< MemoryEffects::Read >() [1/2]

◆ mlir::hasSingleEffect< MemoryEffects::Read >() [2/2]

template bool mlir::hasSingleEffect< MemoryEffects::Read > ( Operation ,
Value  value 
)

◆ mlir::hasSingleEffect< MemoryEffects::Write >() [1/2]

◆ mlir::hasSingleEffect< MemoryEffects::Write >() [2/2]

template bool mlir::hasSingleEffect< MemoryEffects::Write > ( Operation ,
Value  value 
)

◆ mlir::hasSingleEffect< OpOperand *, MemoryEffects::Allocate >()

◆ mlir::hasSingleEffect< OpOperand *, MemoryEffects::Free >()

◆ mlir::hasSingleEffect< OpOperand *, MemoryEffects::Read >()

◆ mlir::hasSingleEffect< OpOperand *, MemoryEffects::Write >()

◆ mlir::hasSingleEffect< OpResult, MemoryEffects::Allocate >()

◆ mlir::hasSingleEffect< OpResult, MemoryEffects::Free >()

◆ mlir::hasSingleEffect< OpResult, MemoryEffects::Read >()

◆ mlir::hasSingleEffect< OpResult, MemoryEffects::Write >()

◆ wouldOpBeTriviallyDeadImpl()

static bool wouldOpBeTriviallyDeadImpl ( Operation rootOp)
static

Internal implementation of mlir::wouldOpBeTriviallyDead that also considers terminator operations as dead if they have no side effects.

This allows for marking region operations as trivially dead without always being conservative of terminators.

Definition at line 43 of file SideEffectInterfaces.cpp.

References mlir::SideEffects::EffectInstance< EffectT >::getEffect(), mlir::Operation::getRegions(), mlir::SideEffects::EffectInstance< EffectT >::getValue(), and mlir::Operation::hasTrait().

Referenced by mlir::wouldOpBeTriviallyDead().