43class ContractTargetOpInterface;
62 assert(
implMemoryEffectOpInterface &&
"`::llzk::verif::ConditionOpInterface` expected its base interface `::mlir::MemoryEffectOpInterface` to be registered");
65 template<
typename ConcreteOp>
71 static inline ::mlir::TypedValue<::mlir::IntegerType>
getCondition(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
73 template<
typename ConcreteOp>
79 static inline ::mlir::TypedValue<::mlir::IntegerType>
getCondition(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
81 template<
typename ConcreteModel,
typename ConcreteOp>
87template <
typename ConcreteOp>
91class ConditionOpInterface :
public ::mlir::OpInterface<ConditionOpInterface, detail::ConditionOpInterfaceInterfaceTraits> {
93 using ::mlir::OpInterface<ConditionOpInterface, detail::ConditionOpInterfaceInterfaceTraits>::OpInterface;
94 template <
typename ConcreteOp>
103 operator ::mlir::MemoryEffectOpInterface ()
const {
104 if (!*
this)
return nullptr;
105 return ::mlir::MemoryEffectOpInterface(*
this, getImpl()->implMemoryEffectOpInterface);
110 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> & effects);
127 assert(
implMemoryEffectOpInterface &&
"`::llzk::verif::PreconditionOpInterface` expected its base interface `::mlir::MemoryEffectOpInterface` to be registered");
129 assert(
implConditionOpInterface &&
"`::llzk::verif::PreconditionOpInterface` expected its base interface `::llzk::verif::ConditionOpInterface` to be registered");
132 template<
typename ConcreteOp>
139 template<
typename ConcreteOp>
146 template<
typename ConcreteModel,
typename ConcreteOp>
152template <
typename ConcreteOp>
156class PreconditionOpInterface :
public ::mlir::OpInterface<PreconditionOpInterface, detail::PreconditionOpInterfaceInterfaceTraits> {
158 using ::mlir::OpInterface<PreconditionOpInterface, detail::PreconditionOpInterfaceInterfaceTraits>::OpInterface;
159 template <
typename ConcreteOp>
165 operator ::mlir::MemoryEffectOpInterface ()
const {
166 if (!*
this)
return nullptr;
167 return ::mlir::MemoryEffectOpInterface(*
this, getImpl()->implMemoryEffectOpInterface);
172 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> & effects);
177 operator ::llzk::verif::ConditionOpInterface ()
const {
178 if (!*
this)
return nullptr;
179 return ::llzk::verif::ConditionOpInterface(*
this, getImpl()->implConditionOpInterface);
201 assert(
implMemoryEffectOpInterface &&
"`::llzk::verif::PostconditionOpInterface` expected its base interface `::mlir::MemoryEffectOpInterface` to be registered");
203 assert(
implConditionOpInterface &&
"`::llzk::verif::PostconditionOpInterface` expected its base interface `::llzk::verif::ConditionOpInterface` to be registered");
206 template<
typename ConcreteOp>
213 template<
typename ConcreteOp>
220 template<
typename ConcreteModel,
typename ConcreteOp>
226template <
typename ConcreteOp>
230class PostconditionOpInterface :
public ::mlir::OpInterface<PostconditionOpInterface, detail::PostconditionOpInterfaceInterfaceTraits> {
232 using ::mlir::OpInterface<PostconditionOpInterface, detail::PostconditionOpInterfaceInterfaceTraits>::OpInterface;
233 template <
typename ConcreteOp>
239 operator ::mlir::MemoryEffectOpInterface ()
const {
240 if (!*
this)
return nullptr;
241 return ::mlir::MemoryEffectOpInterface(*
this, getImpl()->implMemoryEffectOpInterface);
246 void getEffects(::llvm::SmallVectorImpl<::mlir::SideEffects::EffectInstance<::mlir::MemoryEffects::Effect>> & effects);
251 operator ::llzk::verif::ConditionOpInterface ()
const {
252 if (!*
this)
return nullptr;
253 return ::llzk::verif::ConditionOpInterface(*
this, getImpl()->implConditionOpInterface);
271 ::mlir::FailureOr<::mlir::StringRef> (*
getLabel)(
const Concept *
impl, ::mlir::Operation *);
274 template<
typename ConcreteOp>
280 static inline ::mlir::FailureOr<::mlir::StringRef>
getLabel(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
283 template<
typename ConcreteOp>
289 static inline ::mlir::FailureOr<::mlir::StringRef>
getLabel(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
292 template<
typename ConcreteModel,
typename ConcreteOp>
298template <
typename ConcreteOp>
302class InvariantTargetOpInterface :
public ::mlir::OpInterface<InvariantTargetOpInterface, detail::InvariantTargetOpInterfaceInterfaceTraits> {
304 using ::mlir::OpInterface<InvariantTargetOpInterface, detail::InvariantTargetOpInterfaceInterfaceTraits>::OpInterface;
305 template <
typename ConcreteOp>
309 ::mlir::FailureOr<::mlir::StringRef>
getLabel();
325 ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface> (*
getLoops)(
const Concept *
impl, ::mlir::Operation *);
331 assert(
implSymbolOpInterface &&
"`::llzk::verif::ContractTargetOpInterface` expected its base interface `::mlir::SymbolOpInterface` to be registered");
334 template<
typename ConcreteOp>
340 static inline ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface>
getLoops(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
342 template<
typename ConcreteOp>
348 static inline ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface>
getLoops(
const Concept *
impl, ::mlir::Operation *tablegen_opaque_val);
350 template<
typename ConcreteModel,
typename ConcreteOp>
356template <
typename ConcreteOp>
360class ContractTargetOpInterface :
public ::mlir::OpInterface<ContractTargetOpInterface, detail::ContractTargetOpInterfaceInterfaceTraits> {
362 using ::mlir::OpInterface<ContractTargetOpInterface, detail::ContractTargetOpInterfaceInterfaceTraits>::OpInterface;
363 template <
typename ConcreteOp>
367 ::llvm::SmallVector<::llzk::verif::InvariantTargetOpInterface>
getLoops();
371 return ::mlir::StringLiteral(
"contract target interface implementation");
377 operator ::mlir::SymbolOpInterface ()
const {
378 if (!*
this)
return nullptr;
379 return ::mlir::SymbolOpInterface(*
this, getImpl()->implSymbolOpInterface);
387 void setName(::mlir::StringAttr name);
416 ::std::optional<::mlir::SymbolTable::UseRange>
getSymbolUses(::mlir::Operation *
from);
449 setName(::mlir::StringAttr::get((*this)->getContext(), name));
456 template <
typename ConcreteOp>
457 struct ConditionOpInterfaceTrait :
public ::mlir::OpInterface<ConditionOpInterface, detail::ConditionOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
463 template <
typename ConcreteOp>
464 struct PreconditionOpInterfaceTrait :
public ::mlir::OpInterface<PreconditionOpInterface, detail::PreconditionOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
470 template <
typename ConcreteOp>
471 struct PostconditionOpInterfaceTrait :
public ::mlir::OpInterface<PostconditionOpInterface, detail::PostconditionOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
477 template <
typename ConcreteOp>
478 struct InvariantTargetOpInterfaceTrait :
public ::mlir::OpInterface<InvariantTargetOpInterface, detail::InvariantTargetOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
484 template <
typename ConcreteOp>
485 struct ContractTargetOpInterfaceTrait :
public ::mlir::OpInterface<ContractTargetOpInterface, detail::ContractTargetOpInterfaceInterfaceTraits>::Trait<ConcreteOp> {
491template<
typename ConcreteOp>
493 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getCondition();
495template<
typename ConcreteOp>
497 return static_cast<const ConcreteOp *
>(
impl)->
getCondition(tablegen_opaque_val);
511template<
typename ConcreteOp>
513 auto attr = ::llvm::dyn_cast_or_null<::mlir::StringAttr>((llvm::cast<ConcreteOp>(tablegen_opaque_val))->getDiscardableAttr(
"loop_label"));
514 if (!attr) return ::mlir::failure();
515 return attr.getValue();
517template<
typename ConcreteOp>
519 return (llvm::cast<ConcreteOp>(tablegen_opaque_val)).getArgumentTypes();
521template<
typename ConcreteOp>
523 return static_cast<const ConcreteOp *
>(
impl)->
getLabel(tablegen_opaque_val);
525template<
typename ConcreteOp>
533template<
typename ConcreteOp>
535 auto op = (llvm::cast<ConcreteOp>(tablegen_opaque_val));
536 return walkCollect<::llzk::verif::InvariantTargetOpInterface>(op);
538template<
typename ConcreteOp>
540 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
Common interface for precondition and postcondition operations.
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