CIRCT  19.0.0git
Public Member Functions | Public Attributes | List of all members
NLARemover Struct Reference

A tracker for track NLAs affected by a reduction. More...

Collaboration diagram for NLARemover:
Collaboration graph
[legend]

Public Member Functions

void clear ()
 Clear the set of marked NLAs. Call this before attempting a reduction. More...
 
void remove (mlir::ModuleOp module)
 Remove all marked annotations. More...
 
void markNLAsInAnnotation (Attribute anno)
 Mark all NLAs referenced in the given annotation as to be removed. More...
 
void markNLAsInOperation (Operation *op)
 Mark all NLAs referenced in an operation. More...
 

Public Attributes

llvm::DenseSet< StringAttr > nlasToRemove
 The set of NLAs to remove, identified by their symbol. More...
 

Detailed Description

A tracker for track NLAs affected by a reduction.

Performs the necessary cleanup steps in order to maintain IR validity after the reduction has applied. For example, removing an instance that forms part of an NLA path requires that NLA to be removed as well.

Definition at line 114 of file FIRRTLReductions.cpp.

Member Function Documentation

◆ clear()

void NLARemover::clear ( )
inline

Clear the set of marked NLAs. Call this before attempting a reduction.

Definition at line 116 of file FIRRTLReductions.cpp.

◆ markNLAsInAnnotation()

void NLARemover::markNLAsInAnnotation ( Attribute  anno)
inline

Mark all NLAs referenced in the given annotation as to be removed.

This can be an entire array or dictionary of annotations, and the function will descend into child annotations appropriately.

Definition at line 148 of file FIRRTLReductions.cpp.

◆ markNLAsInOperation()

void NLARemover::markNLAsInOperation ( Operation *  op)
inline

Mark all NLAs referenced in an operation.

Also traverses all nested operations. Call this before removing an operation, to mark any associated NLAs as to be removed as well.

Definition at line 163 of file FIRRTLReductions.cpp.

◆ remove()

void NLARemover::remove ( mlir::ModuleOp  module)
inline

Remove all marked annotations.

Call this after applying a reduction in order to validate the IR.

Definition at line 120 of file FIRRTLReductions.cpp.

Member Data Documentation

◆ nlasToRemove

llvm::DenseSet<StringAttr> NLARemover::nlasToRemove

The set of NLAs to remove, identified by their symbol.

Definition at line 171 of file FIRRTLReductions.cpp.


The documentation for this struct was generated from the following file: