22 assert(
implMemoryEffectOpInterface &&
"`::llzk::verif::ConditionOpInterface` expected its base interface `::mlir::MemoryEffectOpInterface` to be registered");
25 template<
typename ConcreteOp>
31 static inline ::mlir::TypedValue<::mlir::IntegerType>
getCondition(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
33 template<
typename ConcreteOp>
39 static inline ::mlir::TypedValue<::mlir::IntegerType>
getCondition(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
41 template<
typename ConcreteModel,
typename ConcreteOp>
47template <
typename ConcreteOp>
51class ConditionOpInterface :
public ::mlir::OpInterface<ConditionOpInterface, detail::ConditionOpInterfaceInterfaceTraits> {
53 using ::mlir::OpInterface<ConditionOpInterface, detail::ConditionOpInterfaceInterfaceTraits>::OpInterface;
54 template <
typename ConcreteOp>
62 operator ::mlir::MemoryEffectOpInterface ()
const {
63 if (!*
this)
return nullptr;
64 return ::mlir::MemoryEffectOpInterface(*
this, getImpl()->implMemoryEffectOpInterface);
68 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> & effects);
71 template <
typename ConcreteOp>
72 struct ConditionOpInterfaceTrait :
public ::mlir::OpInterface<ConditionOpInterface, detail::ConditionOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
79class PreconditionOpInterface;
90 assert(
implMemoryEffectOpInterface &&
"`::llzk::verif::PreconditionOpInterface` expected its base interface `::mlir::MemoryEffectOpInterface` to be registered");
92 assert(
implConditionOpInterface &&
"`::llzk::verif::PreconditionOpInterface` expected its base interface `::llzk::verif::ConditionOpInterface` to be registered");
95 template<
typename ConcreteOp>
102 template<
typename ConcreteOp>
109 template<
typename ConcreteModel,
typename ConcreteOp>
115template <
typename ConcreteOp>
119class PreconditionOpInterface :
public ::mlir::OpInterface<PreconditionOpInterface, detail::PreconditionOpInterfaceInterfaceTraits> {
121 using ::mlir::OpInterface<PreconditionOpInterface, detail::PreconditionOpInterfaceInterfaceTraits>::OpInterface;
122 template <
typename ConcreteOp>
128 operator ::mlir::MemoryEffectOpInterface ()
const {
129 if (!*
this)
return nullptr;
130 return ::mlir::MemoryEffectOpInterface(*
this, getImpl()->implMemoryEffectOpInterface);
134 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> & effects);
139 operator ::llzk::verif::ConditionOpInterface ()
const {
140 if (!*
this)
return nullptr;
141 return ::llzk::verif::ConditionOpInterface(*
this, getImpl()->implConditionOpInterface);
148 template <
typename ConcreteOp>
149 struct PreconditionOpInterfaceTrait :
public ::mlir::OpInterface<PreconditionOpInterface, detail::PreconditionOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
156class PostconditionOpInterface;
167 assert(
implMemoryEffectOpInterface &&
"`::llzk::verif::PostconditionOpInterface` expected its base interface `::mlir::MemoryEffectOpInterface` to be registered");
169 assert(
implConditionOpInterface &&
"`::llzk::verif::PostconditionOpInterface` expected its base interface `::llzk::verif::ConditionOpInterface` to be registered");
172 template<
typename ConcreteOp>
179 template<
typename ConcreteOp>
186 template<
typename ConcreteModel,
typename ConcreteOp>
192template <
typename ConcreteOp>
196class PostconditionOpInterface :
public ::mlir::OpInterface<PostconditionOpInterface, detail::PostconditionOpInterfaceInterfaceTraits> {
198 using ::mlir::OpInterface<PostconditionOpInterface, detail::PostconditionOpInterfaceInterfaceTraits>::OpInterface;
199 template <
typename ConcreteOp>
205 operator ::mlir::MemoryEffectOpInterface ()
const {
206 if (!*
this)
return nullptr;
207 return ::mlir::MemoryEffectOpInterface(*
this, getImpl()->implMemoryEffectOpInterface);
211 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> & effects);
216 operator ::llzk::verif::ConditionOpInterface ()
const {
217 if (!*
this)
return nullptr;
218 return ::llzk::verif::ConditionOpInterface(*
this, getImpl()->implConditionOpInterface);
225 template <
typename ConcreteOp>
226 struct PostconditionOpInterfaceTrait :
public ::mlir::OpInterface<PostconditionOpInterface, detail::PostconditionOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
233class InvariantTargetOpInterface;
238 ::mlir::FailureOr<::mlir::StringRef> (*
getLabel)(
const Concept *
impl, ::mlir::Operation *);
241 template<
typename ConcreteOp>
247 static inline ::mlir::FailureOr<::mlir::StringRef>
getLabel(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
250 template<
typename ConcreteOp>
256 static inline ::mlir::FailureOr<::mlir::StringRef>
getLabel(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
259 template<
typename ConcreteModel,
typename ConcreteOp>
265template <
typename ConcreteOp>
269class InvariantTargetOpInterface :
public ::mlir::OpInterface<InvariantTargetOpInterface, detail::InvariantTargetOpInterfaceInterfaceTraits> {
271 using ::mlir::OpInterface<InvariantTargetOpInterface, detail::InvariantTargetOpInterfaceInterfaceTraits>::OpInterface;
272 template <
typename ConcreteOp>
275 ::mlir::FailureOr<::mlir::StringRef>
getLabel();
280 template <
typename ConcreteOp>
281 struct InvariantTargetOpInterfaceTrait :
public ::mlir::OpInterface<InvariantTargetOpInterface, detail::InvariantTargetOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
288class ContractTargetOpInterface;
293 ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface> (*
getLoops)(
const Concept *
impl, ::mlir::Operation *);
299 assert(
implSymbolOpInterface &&
"`::llzk::verif::ContractTargetOpInterface` expected its base interface `::mlir::SymbolOpInterface` to be registered");
302 template<
typename ConcreteOp>
308 static inline ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface>
getLoops(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
310 template<
typename ConcreteOp>
316 static inline ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface>
getLoops(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
318 template<
typename ConcreteModel,
typename ConcreteOp>
324template <
typename ConcreteOp>
328class ContractTargetOpInterface :
public ::mlir::OpInterface<ContractTargetOpInterface, detail::ContractTargetOpInterfaceInterfaceTraits> {
330 using ::mlir::OpInterface<ContractTargetOpInterface, detail::ContractTargetOpInterfaceInterfaceTraits>::OpInterface;
331 template <
typename ConcreteOp>
334 ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface>
getLoops();
338 return ::mlir::StringLiteral(
"contract target interface implementation");
344 operator ::mlir::SymbolOpInterface ()
const {
345 if (!*
this)
return nullptr;
346 return ::mlir::SymbolOpInterface(*
this, getImpl()->implSymbolOpInterface);
352 void setName(::mlir::StringAttr name);
372 ::std::optional<::mlir::SymbolTable::UseRange>
getSymbolUses(::mlir::Operation *
from);
400 setName(::mlir::StringAttr::get((*this)->getContext(), name));
404 template <
typename ConcreteOp>
405 struct ContractTargetOpInterfaceTrait :
public ::mlir::OpInterface<ContractTargetOpInterface, detail::ContractTargetOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
412template<
typename ConcreteOp>
414 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getCondition();
416template<
typename ConcreteOp>
418 return static_cast<const ConcreteOp *
>(
impl)->
getCondition(tablegen_opaque_val);
432template<
typename ConcreteOp>
434 auto attr = ::mlir::dyn_cast_or_null<::mlir::StringAttr>((llvm::cast<ConcreteOp>(tablegen_opaque_val))->getDiscardableAttr(
"loop_label"));
435 if (!attr) return ::mlir::failure();
436 return attr.getValue();
438template<
typename ConcreteOp>
440 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getArgumentTypes();
442template<
typename ConcreteOp>
444 return static_cast<const ConcreteOp *
>(
impl)->
getLabel(tablegen_opaque_val);
446template<
typename ConcreteOp>
454template<
typename ConcreteOp>
456 auto op = (llvm::cast<ConcreteOp>(tablegen_opaque_val));
457 return walkCollect<::llzk::verif::InvariantTargetOpInterface>(op);
459template<
typename ConcreteOp>
461 return static_cast<const ConcreteOp *
>(
impl)->
getLoops(tablegen_opaque_val);
Apache License January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Collects all of the operation's effects into effects.
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Gets the SSA Value for the condition operand.
bool isPublic()
Returns true if this symbol has public visibility.
void setPublic()
Sets the visibility of this symbol to be public.
bool isPrivate()
Returns true if this symbol has private visibility.
::mlir::StringAttr getNameAttr()
Returns the name of this symbol.
void setPrivate()
Sets the visibility of this symbol to be private.
void setName(::mlir::StringAttr name)
Sets the name of this symbol.
bool isDeclaration()
Returns true if this operation is a declaration of a symbol (as opposed to a definition).
void setVisibility(mlir::SymbolTable::Visibility vis)
Sets the visibility of this symbol.
bool isNested()
Returns true if this symbol has nested visibility.
::std::optional<::mlir::SymbolTable::UseRange > getSymbolUses(::mlir::Operation *from)
Get all of the uses of the current symbol that are nested within the given operation 'from'.
mlir::SymbolTable::Visibility Visibility
void setNested()
Sets the visibility of this symbol to be nested.
::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface > getLoops()
Gets the ops that can be targeted by invariant ops.
::llvm::LogicalResult replaceAllSymbolUses(::mlir::StringAttr newSymbol, ::mlir::Operation *from)
Attempt to replace all uses of the current symbol with the provided symbol 'newSymbol' that are neste...
::mlir::StringRef getName()
Convenience version of getNameAttr that returns a StringRef.
bool symbolKnownUseEmpty(::mlir::Operation *from)
Return if the current symbol is known to have no uses that are nested within the given operation 'fro...
bool canDiscardOnUseEmpty()
Returns true if this operation can be discarded if it has no remaining symbol uses.
::mlir::StringLiteral getOperationName()
Emulates the static method with the same name found in operations.
mlir::SymbolTable::Visibility getVisibility()
Gets the visibility of this symbol.
void setName(::mlir::StringRef name)
Convenience version of setName that take a StringRef.
bool isOptionalSymbol()
Returns true if this operation optionally defines a symbol based on the presence of the symbol name.
::mlir::FailureOr<::mlir::StringRef > getLabel()
Gets the label of the loop, if available.
::mlir::SmallVector<::mlir::Type > getArgumentTypes()
Gets the types of the values that the invariant binds inside its body.
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Gets the SSA Value for the condition operand.
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Collects all of the operation's effects into effects.
::mlir::TypedValue<::mlir::IntegerType > getCondition()
Gets the SSA Value for the condition operand.
void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect > > &effects)
Collects all of the operation's effects into effects.
ConcreteOp ConcreteEntity
::llzk::verif::ConditionOpInterface Interface
static inline ::mlir::TypedValue<::mlir::IntegerType > getCondition(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::TypedValue<::mlir::IntegerType > getCondition(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::verif::ConditionOpInterface Interface
ConcreteOp ConcreteEntity
::llzk::verif::ContractTargetOpInterface Interface
static inline ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface > getLoops(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface > getLoops(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::verif::ContractTargetOpInterface Interface
ConcreteOp ConcreteEntity
static inline ::mlir::FailureOr<::mlir::StringRef > getLabel(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::verif::InvariantTargetOpInterface Interface
static inline ::mlir::SmallVector<::mlir::Type > getArgumentTypes(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
::llzk::verif::InvariantTargetOpInterface Interface
static inline ::mlir::SmallVector<::mlir::Type > getArgumentTypes(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
static inline ::mlir::FailureOr<::mlir::StringRef > getLabel(const Concept *impl, ::mlir::Operation *tablegen_opaque_val)
ConcreteOp ConcreteEntity
::llzk::verif::PostconditionOpInterface Interface
::llzk::verif::PostconditionOpInterface Interface
ConcreteOp ConcreteEntity
::llzk::verif::PreconditionOpInterface Interface
::llzk::verif::PreconditionOpInterface Interface
const ::mlir::MemoryEffectOpInterface::Concept * implMemoryEffectOpInterface
The base classes of this interface.
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
::mlir::TypedValue<::mlir::IntegerType >(* getCondition)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface >(* getLoops)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
const ::mlir::SymbolOpInterface::Concept * implSymbolOpInterface
The base classes of this interface.
::mlir::FailureOr<::mlir::StringRef >(* getLabel)(const Concept *impl, ::mlir::Operation *)
The methods defined by the interface.
::mlir::SmallVector<::mlir::Type >(* getArgumentTypes)(const Concept *impl, ::mlir::Operation *)
const ::mlir::MemoryEffectOpInterface::Concept * implMemoryEffectOpInterface
The methods defined by the interface.
const ::llzk::verif::ConditionOpInterface::Concept * implConditionOpInterface
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
const ::mlir::MemoryEffectOpInterface::Concept * implMemoryEffectOpInterface
The methods defined by the interface.
void initializeInterfaceConcept(::mlir::detail::InterfaceMap &interfaceMap)
const ::llzk::verif::ConditionOpInterface::Concept * implConditionOpInterface