#include "mlir/Transforms/Passes.h"
#include "mlir/IR/PatternMatch.h"
#include "mlir/Interfaces/LoopLikeInterface.h"
#include "mlir/Interfaces/SideEffectInterfaces.h"
#include "mlir/Transforms/LoopInvariantCodeMotionUtils.h"
namespace mlir {
#define GEN_PASS_DEF_LOOPINVARIANTCODEMOTION
#define GEN_PASS_DEF_LOOPINVARIANTSUBSETHOISTING
#include "mlir/Transforms/Passes.h.inc"
}
usingnamespacemlir;
namespace {
struct LoopInvariantCodeMotion
: public impl::LoopInvariantCodeMotionBase<LoopInvariantCodeMotion> { … };
struct LoopInvariantSubsetHoisting
: public impl::LoopInvariantSubsetHoistingBase<
LoopInvariantSubsetHoisting> { … };
}
void LoopInvariantCodeMotion::runOnOperation() { … }
void LoopInvariantSubsetHoisting::runOnOperation() { … }
std::unique_ptr<Pass> mlir::createLoopInvariantCodeMotionPass() { … }
std::unique_ptr<Pass> mlir::createLoopInvariantSubsetHoistingPass() { … }