Documentation for microsoft::quantum::AnyPattern

Pattern that matches any operand.

microsoft::quantum::AnyPattern

Pattern that matches any operand.

#include <Rules/Patterns/AnyPattern.hpp>

Inherits from microsoft::quantum::IOperandPrototype

Public Functions

Name
AnyPattern()
~AnyPattern() override
virtual bool match(Value * instr, Captures & captures) const override
Match of any operand always returns true and ignores children.
virtual Child copy() const override
Creates a copy of the AnyPattern instance.

Additional inherited members

Public Types inherited from microsoft::quantum::IOperandPrototype

Name
using llvm::Instruction Instruction
using std::string String
using llvm::Value Value
using std::shared_ptr< IOperandPrototype > Child
using std::vector< Child > Children
using std::unordered_map< std::string, Value * > Captures

Public Functions inherited from microsoft::quantum::IOperandPrototype

Name
IOperandPrototype() =default
virtual ~IOperandPrototype()
void addChild(Child const & child)
void captureAs(std::string capture_name)

Protected Functions inherited from microsoft::quantum::IOperandPrototype

Name
bool fail(Value * value, Captures & captures) const
Function which should be called whenever a match fails.
bool success(Value * value, Captures & captures) const
Function which should be called whenever a match is successful.
bool matchChildren(Value * value, Captures & captures) const
Subroutine to match all children.
void copyPropertiesFrom(IOperandPrototype const & other)

Public Functions Documentation

function AnyPattern

AnyPattern()

function ~AnyPattern

~AnyPattern() override

function match

virtual bool match(
    Value * instr,
    Captures & captures
) const override

Match of any operand always returns true and ignores children.

Reimplements: microsoft::quantum::IOperandPrototype::match

function copy

virtual Child copy() const override

Creates a copy of the AnyPattern instance.

Reimplements: microsoft::quantum::IOperandPrototype::copy


Updated on 1 August 2023 at 16:25:10 UTC