CIRCT 24.0.0git
Loading...
Searching...
No Matches
LongestPathAnalysis.cpp File Reference
#include "circt/Dialect/Synth/Analysis/LongestPathAnalysis.h"
#include "circt/Dialect/Comb/CombOps.h"
#include "circt/Dialect/HW/HWInstanceGraph.h"
#include "circt/Dialect/HW/HWOps.h"
#include "circt/Dialect/HW/PortImplementation.h"
#include "circt/Dialect/Seq/SeqOps.h"
#include "circt/Dialect/Seq/SeqTypes.h"
#include "circt/Dialect/Synth/SynthOps.h"
#include "circt/Support/InstanceGraph.h"
#include "circt/Support/LLVM.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinOps.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Operation.h"
#include "mlir/IR/Threading.h"
#include "mlir/IR/Value.h"
#include "mlir/IR/Visitors.h"
#include "mlir/Pass/AnalysisManager.h"
#include "mlir/Pass/PassManager.h"
#include "mlir/Pass/PassRegistry.h"
#include "mlir/Support/FileUtilities.h"
#include "mlir/Support/LLVM.h"
#include "llvm/ADT//MapVector.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMapInfoVariant.h"
#include "llvm/ADT/EquivalenceClasses.h"
#include "llvm/ADT/ImmutableList.h"
#include "llvm/ADT/MapVector.h"
#include "llvm/ADT/PostOrderIterator.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/StringRef.h"
#include "llvm/Support/Debug.h"
#include "llvm/Support/ErrorHandling.h"
#include "llvm/Support/JSON.h"
#include "llvm/Support/LogicalResult.h"
#include "llvm/Support/MathExtras.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/raw_ostream.h"
#include <condition_variable>
#include <cstddef>
#include <cstdint>
#include <memory>
#include <mutex>
Include dependency graph for LongestPathAnalysis.cpp:

Go to the source code of this file.

Classes

class  Context
 This class provides a thread-safe interface to access the analysis results. More...
class  OperationAnalyzer
class  LocalVisitor
struct  synth.LongestPathAnalysis::Impl
 Internal implementation for LongestPathAnalysis. More...

Macros

#define DEBUG_TYPE   "aig-longest-path-analysis"

Functions

static size_t getBitWidth (Value value)
template<typename T, typename Key>
static void deduplicatePathsImpl (SmallVectorImpl< T > &results, size_t startIndex, llvm::function_ref< Key(const T &)> keyFn, llvm::function_ref< int64_t(const T &)> delayFn)
static void filterPaths (SmallVectorImpl< OpenPath > &results, bool keepOnlyMaxDelay, bool isLocalScope)
static void filterPaths (SmallVectorImpl< DataflowPath > &results, size_t startIndex=0)
static llvm::ImmutableList< DebugPoint > mapList (llvm::ImmutableListFactory< DebugPoint > *debugPointFactory, llvm::ImmutableList< DebugPoint > list, llvm::function_ref< DebugPoint(DebugPoint)> fn)
static llvm::ImmutableList< DebugPoint > concatList (llvm::ImmutableListFactory< DebugPoint > *debugPointFactory, llvm::ImmutableList< DebugPoint > lhs, llvm::ImmutableList< DebugPoint > rhs)
static StringAttr getNameImpl (Value value)
static void printObjectImpl (llvm::raw_ostream &os, const Object &object, int64_t delay=-1, llvm::ImmutableList< DebugPoint > history={}, StringRef comment="")
template<typename T>
static int64_t getMaxDelayInPaths (ArrayRef< T > paths)
static llvm::json::Value toJSON (const circt::igraph::InstancePath &path)
static llvm::json::Value toJSON (const circt::synth::Object &object)
static llvm::json::Value toJSON (const DataflowPath::EndPointType &path, hw::HWModuleOp root)
static llvm::json::Value toJSON (const DebugPoint &point)
static llvm::json::Value toJSON (const OpenPath &path)

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "aig-longest-path-analysis"

Definition at line 76 of file LongestPathAnalysis.cpp.

Function Documentation

◆ concatList()

llvm::ImmutableList< DebugPoint > concatList ( llvm::ImmutableListFactory< DebugPoint > * debugPointFactory,
llvm::ImmutableList< DebugPoint > lhs,
llvm::ImmutableList< DebugPoint > rhs )
static

◆ deduplicatePathsImpl()

template<typename T, typename Key>
void deduplicatePathsImpl ( SmallVectorImpl< T > & results,
size_t startIndex,
llvm::function_ref< Key(const T &)> keyFn,
llvm::function_ref< int64_t(const T &)> delayFn )
static

Definition at line 90 of file LongestPathAnalysis.cpp.

Referenced by filterPaths(), and filterPaths().

◆ filterPaths() [1/2]

void filterPaths ( SmallVectorImpl< DataflowPath > & results,
size_t startIndex = 0 )
static

Definition at line 175 of file LongestPathAnalysis.cpp.

References deduplicatePathsImpl().

◆ filterPaths() [2/2]

void filterPaths ( SmallVectorImpl< OpenPath > & results,
bool keepOnlyMaxDelay,
bool isLocalScope )
static

◆ getBitWidth()

size_t getBitWidth ( Value value)
static

Definition at line 80 of file LongestPathAnalysis.cpp.

◆ getMaxDelayInPaths()

template<typename T>
int64_t getMaxDelayInPaths ( ArrayRef< T > paths)
static

◆ getNameImpl()

StringAttr getNameImpl ( Value value)
static

Definition at line 207 of file LongestPathAnalysis.cpp.

Referenced by circt::synth::Object::getName().

◆ mapList()

llvm::ImmutableList< DebugPoint > mapList ( llvm::ImmutableListFactory< DebugPoint > * debugPointFactory,
llvm::ImmutableList< DebugPoint > list,
llvm::function_ref< DebugPoint(DebugPoint)> fn )
static

◆ printObjectImpl()

void printObjectImpl ( llvm::raw_ostream & os,
const Object & object,
int64_t delay = -1,
llvm::ImmutableList< DebugPoint > history = {},
StringRef comment = "" )
static

◆ toJSON() [1/5]

llvm::json::Value toJSON ( const circt::igraph::InstancePath & path)
static

Definition at line 382 of file LongestPathAnalysis.cpp.

◆ toJSON() [2/5]

llvm::json::Value toJSON ( const circt::synth::Object & object)
static

Definition at line 393 of file LongestPathAnalysis.cpp.

References circt::synth::toJSON().

◆ toJSON() [3/5]

llvm::json::Value toJSON ( const DataflowPath::EndPointType & path,
hw::HWModuleOp root )
static

Definition at line 401 of file LongestPathAnalysis.cpp.

References circt::synth::toJSON().

◆ toJSON() [4/5]

llvm::json::Value toJSON ( const DebugPoint & point)
static

Definition at line 416 of file LongestPathAnalysis.cpp.

References circt::synth::toJSON().

◆ toJSON() [5/5]

llvm::json::Value toJSON ( const OpenPath & path)
static

Definition at line 424 of file LongestPathAnalysis.cpp.

References circt::synth::toJSON().