15#ifndef CIRCT_SUPPORT_PROJECTIONUTILS_H
16#define CIRCT_SUPPORT_PROJECTIONUTILS_H
20#include "mlir/IR/Value.h"
46 return std::holds_alternative<DynProjectionRange>(range);
51 return cast<RefType>(slot.getType()).getNestedType();
77std::pair<Operation *, std::optional<ProjectionRange>>
std::pair< Operation *, std::optional< ProjectionRange > > getRootSignalAndRange(Value sig)
Given a signal or a projection, find the root signal declaration by traversing the projection chain.
std::optional< ProjectionRange > getProjectionRange(Operation *op)
Calculate a projection's range.
std::variant< ConstProjectionRange, DynProjectionRange > ProjectionRange
Portion of the signal operand that is selected by a projection.
Type getStoredType(Value slot)
Return the type stored in a signal or projection.
Operation * getRootSignal(Value sig)
Given a signal or a projection, walk back the projection chain until you find the root signal declara...
bool isProjection(const Operation *op)
Check if an op is one of the supported projection types.
bool isDynamic(const ProjectionRange &range)
Helper to check if a projection range is dynamic or not.
bool isProvablyDisjoint(const ProjectionRange &a, const ProjectionRange &b)
Check whether two projections provably describe disjoint storage.
The InstanceGraph op interface, see InstanceGraphInterface.td for more details.
Portion of a signal selected by a projection, with a statically known offset and width in bits.
Portion of a signal selected by a projection with a dynamic index.