CIRCT 24.0.0git
Loading...
Searching...
No Matches
circt::om Namespace Reference

Namespaces

namespace  evaluator

Classes

class  Evaluator
 An Evaluator, which is constructed with an IR module and can instantiate Objects. More...
struct  PathElement
 A module name, and the name of an instance inside that module. More...
struct  OMReducePatternDialectInterface
 A dialect interface to provide reduction patterns to a reducer tool. More...

Typedefs

using Object = evaluator::ObjectValue
using EvaluatorValuePtr = evaluator::EvaluatorValuePtr

Functions

SmallVector< EvaluatorValuePtr > getEvaluatorValuesFromAttributes (MLIRContext *context, ArrayRef< Attribute > attributes)
static mlir::Diagnostic & operator<< (mlir::Diagnostic &diag, const evaluator::EvaluatorValue &evaluatorValue)
 Helper to enable printing objects in Diagnostics.
static mlir::Diagnostic & operator<< (mlir::Diagnostic &diag, const EvaluatorValuePtr &evaluatorValue)
 Helper to enable printing objects in Diagnostics.
static llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const evaluator::EvaluatorValue &evaluatorValue)
 Helper to enable printing objects to raw_ostream (e.g., llvm::dbgs()).
static llvm::raw_ostream & operator<< (llvm::raw_ostream &os, const EvaluatorValuePtr &evaluatorValue)
std::unique_ptr< mlir::Pass > createFreezePathsPass (std::function< StringAttr(Operation *)> getOpNameFallback={})
void registerReducePatternDialectInterface (mlir::DialectRegistry &registry)
 Register the OM Reduction pattern dialect interface to the given registry.
ParseResult parseBasePath (MLIRContext *context, StringRef spelling, PathAttr &path)
 Parse a target string of the form "Foo/bar:Bar/baz" in to a base path.
ParseResult parsePath (MLIRContext *context, StringRef spelling, PathAttr &path, StringAttr &module, StringAttr &ref, StringAttr &field)
 Parse a target string in to a path.

Typedef Documentation

◆ EvaluatorValuePtr

◆ Object

Definition at line 291 of file Evaluator.h.

Function Documentation

◆ createFreezePathsPass()

std::unique_ptr< mlir::Pass > circt::om::createFreezePathsPass ( std::function< StringAttr(Operation *)> getOpNameFallback = {})

Definition at line 368 of file FreezePaths.cpp.

Referenced by circt::firtool::populateFinalizeIR().

◆ getEvaluatorValuesFromAttributes()

SmallVector< evaluator::EvaluatorValuePtr > circt::om::getEvaluatorValuesFromAttributes ( MLIRContext * context,
ArrayRef< Attribute > attributes )

◆ operator<<() [1/4]

llvm::raw_ostream & circt::om::operator<< ( llvm::raw_ostream & os,
const evaluator::EvaluatorValue & evaluatorValue )
inlinestatic

Helper to enable printing objects to raw_ostream (e.g., llvm::dbgs()).

Delegates to the Diagnostic overload via an intermediate string.

Definition at line 427 of file Evaluator.h.

References circt::om::evaluator::EvaluatorValue::getContext().

◆ operator<<() [2/4]

llvm::raw_ostream & circt::om::operator<< ( llvm::raw_ostream & os,
const EvaluatorValuePtr & evaluatorValue )
inlinestatic

Definition at line 439 of file Evaluator.h.

◆ operator<<() [3/4]

mlir::Diagnostic & circt::om::operator<< ( mlir::Diagnostic & diag,
const evaluator::EvaluatorValue & evaluatorValue )
inlinestatic

Helper to enable printing objects in Diagnostics.

Definition at line 395 of file Evaluator.h.

References assert(), and circt::om::evaluator::EvaluatorValue::isUnknown().

◆ operator<<() [4/4]

mlir::Diagnostic & circt::om::operator<< ( mlir::Diagnostic & diag,
const EvaluatorValuePtr & evaluatorValue )
inlinestatic

Helper to enable printing objects in Diagnostics.

Definition at line 419 of file Evaluator.h.

◆ parseBasePath()

ParseResult circt::om::parseBasePath ( MLIRContext * context,
StringRef spelling,
PathAttr & path )

Parse a target string of the form "Foo/bar:Bar/baz" in to a base path.

Definition at line 177 of file OMUtils.cpp.

References context.

Referenced by parseBasePathString().

◆ parsePath()

ParseResult circt::om::parsePath ( MLIRContext * context,
StringRef spelling,
PathAttr & path,
StringAttr & module,
StringAttr & ref,
StringAttr & field )

Parse a target string in to a path.

"Foo/bar:Bar/baz:Baz>wire.a[1]" |-----------—| Path |–| Module |–| Ref |—| Field

Definition at line 182 of file OMUtils.cpp.

References context.

Referenced by parsePathString().

◆ registerReducePatternDialectInterface()

void circt::om::registerReducePatternDialectInterface ( mlir::DialectRegistry & registry)

Register the OM Reduction pattern dialect interface to the given registry.

Definition at line 399 of file OMReductions.cpp.

References registerReducePatternDialectInterface().

Referenced by registerReducePatternDialectInterface().