CIRCT 24.0.0git
Loading...
Searching...
No Matches
FIRRTLAnnotationHelper.cpp File Reference
#include "circt/Dialect/FIRRTL/FIRRTLAnnotationHelper.h"
#include "circt/Dialect/FIRRTL/AnnotationDetails.h"
#include "circt/Dialect/FIRRTL/FIRRTLUtils.h"
#include "mlir/IR/ImplicitLocOpBuilder.h"
#include "llvm/Support/Debug.h"
Include dependency graph for FIRRTLAnnotationHelper.cpp:

Go to the source code of this file.

Macros

#define DEBUG_TYPE   "lower-annos"

Functions

static LogicalResult updateExpandedPort (StringRef field, AnnoTarget &ref)
static FailureOr< unsigned > findBundleElement (Operation *op, Type type, StringRef field)
 Try to resolve an non-array aggregate name from a target given the type and operation of the resolved target.
static FailureOr< unsigned > findVectorElement (Operation *op, Type type, StringRef indexStr)
 Try to resolve an array index from a target given the type of the resolved target.
static FailureOr< unsigned > findFieldID (AnnoTarget &ref, ArrayRef< TargetToken > tokens)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "lower-annos"

Definition at line 19 of file FIRRTLAnnotationHelper.cpp.

Function Documentation

◆ findBundleElement()

FailureOr< unsigned > findBundleElement ( Operation * op,
Type type,
StringRef field )
static

Try to resolve an non-array aggregate name from a target given the type and operation of the resolved target.

This needs to deal with places where we represent bundle returns as split into constituent parts.

Definition at line 43 of file FIRRTLAnnotationHelper.cpp.

References failure(), and circt::firrtl::type_dyn_cast().

Referenced by findFieldID().

◆ findFieldID()

◆ findVectorElement()

FailureOr< unsigned > findVectorElement ( Operation * op,
Type type,
StringRef indexStr )
static

Try to resolve an array index from a target given the type of the resolved target.

Definition at line 62 of file FIRRTLAnnotationHelper.cpp.

References failure(), and circt::firrtl::type_dyn_cast().

Referenced by findFieldID().

◆ updateExpandedPort()

LogicalResult updateExpandedPort ( StringRef field,
AnnoTarget & ref )
static

Definition at line 29 of file FIRRTLAnnotationHelper.cpp.

References failure(), circt::firrtl::AnnoTarget::getOp(), and success().

Referenced by findFieldID().