Add missing llvm:: and mlir:: namespaces qualifiers to some auto-generated code.
Reviewed By: ftynse, springerm
Differential Revision: https://reviews.llvm.org/D143381
/*args=*/(ins "unsigned":$index),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return mlir::bufferization::detail::defaultIsRepetitiveRegion(
+ return ::mlir::bufferization::detail::defaultIsRepetitiveRegion(
cast<BufferizableOpInterface>($_op.getOperation()), index);
}]
>
let extraClassDeclaration = [{
/// Resolve out-of-place tensor OpOperands with explicit allocations in the
/// form of `bufferization.alloc_tensor` ops.
- LogicalResult resolveTensorOpOperandConflicts(
- RewriterBase &rewriter, const AnalysisState &state);
+ ::mlir::LogicalResult resolveTensorOpOperandConflicts(
+ ::mlir::RewriterBase &rewriter,
+ const ::mlir::bufferization::AnalysisState &state);
/// Return `true` if the given OpOperand creates an alias but does neither
/// read nor write. This implies that `bufferizesToMemoryRead` and
/// be called on OpOperands that do not have a tensor type.
///
/// Examples of such ops are `tensor.extract_slice` and `tensor.cast`.
- bool bufferizesToAliasOnly(OpOperand &opOperand,
- const AnalysisState &state) {
+ bool bufferizesToAliasOnly(
+ ::mlir::OpOperand &opOperand,
+ const ::mlir::bufferization::AnalysisState &state) {
auto bufferizableOp =
- cast<BufferizableOpInterface>(getOperation());
+ cast<::mlir::bufferization::BufferizableOpInterface>(getOperation());
return !bufferizableOp.bufferizesToMemoryRead(opOperand, state)
&& !bufferizableOp.bufferizesToMemoryWrite(opOperand, state)
&& !bufferizableOp.getAliasingOpResults(opOperand, state).empty();
>,
InterfaceMethod<
/*desc=*/"Return the init operands.",
- /*retTy=*/"OpOperandVector",
+ /*retTy=*/"::mlir::OpOperandVector",
/*methodName=*/"getDpsInitOperands",
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
auto [start, end] = $_op.getDpsInitsPositionRange();
- OpOperandVector result;
+ ::mlir::OpOperandVector result;
result.reserve(end - start);
for (int i = start; i < end; ++i)
result.push_back(&$_op->getOpOperand(i));
>,
InterfaceMethod<
/*desc=*/"Return the `i`-th init operand.",
- /*retTy=*/"OpOperand *",
+ /*retTy=*/"::mlir::OpOperand *",
/*methodName=*/"getDpsInitOperand",
/*args=*/(ins "int64_t":$i),
/*methodBody=*/"",
/*desc=*/"Set the `i`-th init operand.",
/*retTy=*/"void",
/*methodName=*/"setDpsInitOperand",
- /*args=*/(ins "int64_t":$i, "Value":$value),
+ /*args=*/(ins "int64_t":$i, "::mlir::Value":$value),
/*methodBody=*/"",
/*defaultImplementation=*/[{
assert(i >= 0 && i < $_op.getNumDpsInits());
>,
InterfaceMethod<
/*desc=*/"Return the input operands.",
- /*retTy=*/"OpOperandVector",
+ /*retTy=*/"::mlir::OpOperandVector",
/*methodName=*/"getDpsInputOperands",
/*args=*/(ins),
/*methodBody=*/"",
int64_t numInits = end - start;
int64_t numOperands = $_op.getNumOperands();
- OpOperandVector result;
+ ::mlir::OpOperandVector result;
result.reserve(numOperands - numInits);
for (int i = 0; i < start; ++i)
result.push_back(&$_op->getOpOperand(i));
>,
InterfaceMethod<
/*desc=*/[{ Return the `i`-th input operand. }],
- /*retTy=*/"OpOperand *",
+ /*retTy=*/"::mlir::OpOperand *",
/*methodName=*/"getDpsInputOperand",
/*args=*/(ins "int64_t":$i),
/*methodBody=*/"",
/*desc=*/"Return true if `opOperand` is an input.",
/*retTy=*/"bool",
/*methodName=*/"isDpsInput",
- /*args=*/(ins "OpOperand *":$opOperand),
+ /*args=*/(ins "::mlir::OpOperand *":$opOperand),
/*methodBody=*/"",
/*defaultImplementation=*/[{
auto [start, end] = $_op.getDpsInitsPositionRange();
/*desc=*/"Return true if `opOperand` is an init.",
/*retTy=*/"bool",
/*methodName=*/"isDpsInit",
- /*args=*/(ins "OpOperand *":$opOperand),
+ /*args=*/(ins "::mlir::OpOperand *":$opOperand),
/*methodBody=*/"",
/*defaultImplementation=*/[{
auto [start, end] = $_op.getDpsInitsPositionRange();
/*desc=*/"Return true if the `opOperand` is a scalar value.",
/*retTy=*/"bool",
/*methodName=*/"isScalar",
- /*args=*/(ins "OpOperand *":$opOperand),
+ /*args=*/(ins "::mlir::OpOperand *":$opOperand),
/*methodBody=*/"",
/*defaultImplementation=*/[{
assert(opOperand->getOwner() == $_op.getOperation());
>,
InterfaceMethod<
/*desc=*/"Return the OpResult that is tied to the given OpOperand.",
- /*retTy=*/"OpResult",
+ /*retTy=*/"::mlir::OpResult",
/*methodName=*/"getTiedOpResult",
- /*args=*/(ins "OpOperand *":$opOperand),
+ /*args=*/(ins "::mlir::OpOperand *":$opOperand),
/*methodBody=*/"",
/*defaultImplementation=*/[{
assert(opOperand->getOwner() == $_op.getOperation());
>,
InterfaceMethod<
/*desc=*/"Return the OpOperand that is tied to the given OpResult.",
- /*retTy=*/"OpOperand *",
+ /*retTy=*/"::mlir::OpOperand *",
/*methodName=*/"getTiedOpOperand",
- /*args=*/(ins "OpResult":$opResult),
+ /*args=*/(ins "::mlir::OpResult":$opResult),
/*methodBody=*/"",
/*defaultImplementation=*/[{
assert(opResult.getDefiningOp() == $_op.getOperation());
/*methodBody=*/"",
/*defaultImplementation=*/[{
return $_op->getNumResults() == 0 &&
- llvm::all_of($_op->getOpOperands(),
- [&](OpOperand &opOperand) {
+ ::llvm::all_of($_op->getOpOperands(),
+ [&](::mlir::OpOperand &opOperand) {
return isScalar(&opOperand) ||
- opOperand.get().getType().template isa<MemRefType>();
+ opOperand.get().getType().template isa<::mlir::MemRefType>();
});
}]
>,
/*args=*/(ins),
/*methodBody=*/"",
/*defaultImplementation=*/[{
- return llvm::all_of($_op->getOpOperands(),
- [&](OpOperand &opOperand) {
+ return ::llvm::all_of($_op->getOpOperands(),
+ [&](::mlir::OpOperand &opOperand) {
return isScalar(&opOperand) ||
- opOperand.get().getType().template isa<RankedTensorType>();
+ opOperand.get().getType().template isa<::mlir::RankedTensorType>();
});
}]
>
/// Collect all of the effect instances that correspond to the given
/// `Effect` and place them in 'effects'.
template <typename Effect> void getEffects(
- SmallVectorImpl<::mlir::SideEffects::EffectInstance<
+ ::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
}] # baseEffect # [{>> &effects) {
getEffects(effects);
- llvm::erase_if(effects, [&](auto &it) {
- return !llvm::isa<Effect>(it.getEffect());
+ ::llvm::erase_if(effects, [&](auto &it) {
+ return !::llvm::isa<Effect>(it.getEffect());
});
}
/// Returns true if this operation exhibits the given effect.
template <typename Effect> bool hasEffect() {
- SmallVector<SideEffects::EffectInstance<}] # baseEffect # [{>, 4> effects;
+ ::llvm::SmallVector<::mlir::SideEffects::EffectInstance<
+ }] # baseEffect # [{>, 4> effects;
getEffects(effects);
- return llvm::any_of(effects, [](const auto &it) {
- return llvm::isa<Effect>(it.getEffect());
+ return ::llvm::any_of(effects, [](const auto &it) {
+ return ::llvm::isa<Effect>(it.getEffect());
});
}
/// Returns true if this operation only has the given effect.
template <typename Effect> bool onlyHasEffect() {
- SmallVector<SideEffects::EffectInstance<}] # baseEffect # [{>, 4> effects;
+ ::llvm::SmallVector<::mlir::SideEffects::EffectInstance<
+ }] # baseEffect # [{>, 4> effects;
getEffects(effects);
- return !effects.empty() && llvm::all_of(effects, [](const auto &it) {
+ return !effects.empty() && ::llvm::all_of(effects, [](const auto &it) {
return isa<Effect>(it.getEffect());
});
}
/// Returns true if this operation has no effects.
bool hasNoEffect() {
- SmallVector<::mlir::SideEffects::EffectInstance<}] # baseEffect # [{>, 4> effects;
+ ::llvm::SmallVector<::mlir::SideEffects::EffectInstance<
+ }] # baseEffect # [{>, 4> effects;
getEffects(effects);
return effects.empty();
}
/// Collect all of the effect instances that operate on the provided value
/// and place them in 'effects'.
void getEffectsOnValue(::mlir::Value value,
- llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
+ ::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
}] # baseEffect # [{>> & effects) {
getEffects(effects);
- llvm::erase_if(effects, [&](auto &it) { return it.getValue() != value; });
+ ::llvm::erase_if(effects, [&](auto &it) { return it.getValue() != value; });
}
/// Return the effect of the given type `Effect` that is applied to the
template <typename Effect>
::std::optional<::mlir::SideEffects::EffectInstance<}] # baseEffect # [{>>
getEffectOnValue(::mlir::Value value) {
- llvm::SmallVector<::mlir::SideEffects::EffectInstance<
+ ::llvm::SmallVector<::mlir::SideEffects::EffectInstance<
}] # baseEffect # [{>, 4> effects;
getEffects(effects);
- auto it = llvm::find_if(effects, [&](auto &it) {
+ auto it = ::llvm::find_if(effects, [&](auto &it) {
return isa<Effect>(it.getEffect()) && it.getValue() == value;
});
if (it == effects.end())
/// Collect all of the effect instances that operate on the provided symbol
/// reference and place them in 'effects'.
void getEffectsOnSymbol(::mlir::SymbolRefAttr value,
- llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
+ ::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
}] # baseEffect # [{>> & effects) {
getEffects(effects);
- llvm::erase_if(effects, [&](auto &it) {
+ ::llvm::erase_if(effects, [&](auto &it) {
return it.getSymbolRef() != value;
});
}
/// Collect all of the effect instances that operate on the provided
/// resource and place them in 'effects'.
void getEffectsOnResource(::mlir::SideEffects::Resource *resource,
- llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
+ ::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<
}] # baseEffect # [{>> & effects) {
getEffects(effects);
- llvm::erase_if(effects, [&](auto &it) {
+ ::llvm::erase_if(effects, [&](auto &it) {
return it.getResource() != resource;
});
}