mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 21:06:05 +00:00
28 lines
1.1 KiB
C++
28 lines
1.1 KiB
C++
![]() |
//===- SideEffects.cpp - SideEffects in MLIR ------------------------------===//
|
||
|
//
|
||
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
||
|
// See https://llvm.org/LICENSE.txt for license information.
|
||
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
||
|
//
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
#include "mlir/Interfaces/SideEffects.h"
|
||
|
|
||
|
using namespace mlir;
|
||
|
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
// SideEffect Interfaces
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
/// Include the definitions of the side effect interfaces.
|
||
|
#include "mlir/Interfaces/SideEffectInterfaces.cpp.inc"
|
||
|
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
// MemoryEffects
|
||
|
//===----------------------------------------------------------------------===//
|
||
|
|
||
|
bool MemoryEffects::Effect::classof(const SideEffects::Effect *effect) {
|
||
|
return isa<Allocate>(effect) || isa<Free>(effect) || isa<Read>(effect) ||
|
||
|
isa<Write>(effect);
|
||
|
}
|