#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinTypes.h"
#include "mlir/IR/OpDefinition.h"
#include "llvm/ADT/BitVector.h"
#include "llvm/Support/SHA1.h"
#include <numeric>
#include <optional>
usingnamespacemlir;
NamedAttrList::NamedAttrList(ArrayRef<NamedAttribute> attributes) { … }
NamedAttrList::NamedAttrList(DictionaryAttr attributes)
: … { … }
NamedAttrList::NamedAttrList(const_iterator inStart, const_iterator inEnd) { … }
ArrayRef<NamedAttribute> NamedAttrList::getAttrs() const { … }
std::optional<NamedAttribute> NamedAttrList::findDuplicate() const { … }
DictionaryAttr NamedAttrList::getDictionary(MLIRContext *context) const { … }
void NamedAttrList::append(StringRef name, Attribute attr) { … }
void NamedAttrList::assign(const_iterator inStart, const_iterator inEnd) { … }
void NamedAttrList::push_back(NamedAttribute newAttribute) { … }
Attribute NamedAttrList::get(StringRef name) const { … }
Attribute NamedAttrList::get(StringAttr name) const { … }
std::optional<NamedAttribute> NamedAttrList::getNamed(StringRef name) const { … }
std::optional<NamedAttribute> NamedAttrList::getNamed(StringAttr name) const { … }
Attribute NamedAttrList::set(StringAttr name, Attribute value) { … }
Attribute NamedAttrList::set(StringRef name, Attribute value) { … }
Attribute
NamedAttrList::eraseImpl(SmallVectorImpl<NamedAttribute>::iterator it) { … }
Attribute NamedAttrList::erase(StringAttr name) { … }
Attribute NamedAttrList::erase(StringRef name) { … }
NamedAttrList &
NamedAttrList::operator=(const SmallVectorImpl<NamedAttribute> &rhs) { … }
operator ArrayRef()
OperationState::OperationState(Location location, StringRef name)
: … { … }
OperationState::OperationState(Location location, OperationName name)
: … { … }
OperationState::OperationState(Location location, OperationName name,
ValueRange operands, TypeRange types,
ArrayRef<NamedAttribute> attributes,
BlockRange successors,
MutableArrayRef<std::unique_ptr<Region>> regions)
: … { … }
OperationState::OperationState(Location location, StringRef name,
ValueRange operands, TypeRange types,
ArrayRef<NamedAttribute> attributes,
BlockRange successors,
MutableArrayRef<std::unique_ptr<Region>> regions)
: … { … }
OperationState::~OperationState() { … }
LogicalResult OperationState::setProperties(
Operation *op, function_ref<InFlightDiagnostic()> emitError) const { … }
void OperationState::addOperands(ValueRange newOperands) { … }
void OperationState::addSuccessors(BlockRange newSuccessors) { … }
Region *OperationState::addRegion() { … }
void OperationState::addRegion(std::unique_ptr<Region> &®ion) { … }
void OperationState::addRegions(
MutableArrayRef<std::unique_ptr<Region>> regions) { … }
detail::OperandStorage::OperandStorage(Operation *owner,
OpOperand *trailingOperands,
ValueRange values)
: … { … }
detail::OperandStorage::~OperandStorage() { … }
void detail::OperandStorage::setOperands(Operation *owner, ValueRange values) { … }
void detail::OperandStorage::setOperands(Operation *owner, unsigned start,
unsigned length, ValueRange operands) { … }
void detail::OperandStorage::eraseOperands(unsigned start, unsigned length) { … }
void detail::OperandStorage::eraseOperands(const BitVector &eraseIndices) { … }
MutableArrayRef<OpOperand> detail::OperandStorage::resize(Operation *owner,
unsigned newSize) { … }
unsigned OperandRange::getBeginOperandIndex() const { … }
OperandRangeRange OperandRange::split(DenseI32ArrayAttr segmentSizes) const { … }
OperandRangeRange::OperandRangeRange(OperandRange operands,
Attribute operandSegments)
: … { … }
OperandRange OperandRangeRange::join() const { … }
OperandRange OperandRangeRange::dereference(const OwnerT &object,
ptrdiff_t index) { … }
MutableOperandRange::MutableOperandRange(
Operation *owner, unsigned start, unsigned length,
ArrayRef<OperandSegment> operandSegments)
: … { … }
MutableOperandRange::MutableOperandRange(Operation *owner)
: … { … }
MutableOperandRange::MutableOperandRange(OpOperand &opOperand)
: … { … }
MutableOperandRange
MutableOperandRange::slice(unsigned subStart, unsigned subLen,
std::optional<OperandSegment> segment) const { … }
void MutableOperandRange::append(ValueRange values) { … }
void MutableOperandRange::assign(ValueRange values) { … }
void MutableOperandRange::assign(Value value) { … }
void MutableOperandRange::erase(unsigned subStart, unsigned subLen) { … }
void MutableOperandRange::clear() { … }
OperandRange MutableOperandRange::getAsOperandRange() const { … }
operator OperandRange()
operator MutableArrayRef()
MutableOperandRangeRange
MutableOperandRange::split(NamedAttribute segmentSizes) const { … }
void MutableOperandRange::updateLength(unsigned newLength) { … }
OpOperand &MutableOperandRange::operator[](unsigned index) const { … }
MutableArrayRef<OpOperand>::iterator MutableOperandRange::begin() const { … }
MutableArrayRef<OpOperand>::iterator MutableOperandRange::end() const { … }
MutableOperandRangeRange::MutableOperandRangeRange(
const MutableOperandRange &operands, NamedAttribute operandSegmentAttr)
: … { … }
MutableOperandRange MutableOperandRangeRange::join() const { … }
operator OperandRangeRange()
MutableOperandRange MutableOperandRangeRange::dereference(const OwnerT &object,
ptrdiff_t index) { … }
ResultRange::ResultRange(OpResult result)
: … { … }
ResultRange::use_range ResultRange::getUses() const { … }
ResultRange::use_iterator ResultRange::use_begin() const { … }
ResultRange::use_iterator ResultRange::use_end() const { … }
ResultRange::user_range ResultRange::getUsers() { … }
ResultRange::user_iterator ResultRange::user_begin() { … }
ResultRange::user_iterator ResultRange::user_end() { … }
ResultRange::UseIterator::UseIterator(ResultRange results, bool end)
: … { … }
ResultRange::UseIterator &ResultRange::UseIterator::operator++() { … }
void ResultRange::UseIterator::skipOverResultsWithNoUsers() { … }
void ResultRange::replaceAllUsesWith(Operation *op) { … }
void ResultRange::replaceUsesWithIf(
Operation *op, function_ref<bool(OpOperand &)> shouldReplace) { … }
ValueRange::ValueRange(ArrayRef<Value> values)
: … { … }
ValueRange::ValueRange(OperandRange values)
: … { … }
ValueRange::ValueRange(ResultRange values)
: … { … }
ValueRange::OwnerT ValueRange::offset_base(const OwnerT &owner,
ptrdiff_t index) { … }
Value ValueRange::dereference_iterator(const OwnerT &owner, ptrdiff_t index) { … }
llvm::hash_code OperationEquivalence::computeHash(
Operation *op, function_ref<llvm::hash_code(Value)> hashOperands,
function_ref<llvm::hash_code(Value)> hashResults, Flags flags) { … }
bool OperationEquivalence::isRegionEquivalentTo(
Region *lhs, Region *rhs,
function_ref<LogicalResult(Value, Value)> checkEquivalent,
function_ref<void(Value, Value)> markEquivalent,
OperationEquivalence::Flags flags,
function_ref<LogicalResult(ValueRange, ValueRange)>
checkCommutativeEquivalent) { … }
struct ValueEquivalenceCache { … };
bool
OperationEquivalence::isRegionEquivalentTo(Region *lhs, Region *rhs,
OperationEquivalence::Flags flags) { … }
bool OperationEquivalence::isEquivalentTo(
Operation *lhs, Operation *rhs,
function_ref<LogicalResult(Value, Value)> checkEquivalent,
function_ref<void(Value, Value)> markEquivalent, Flags flags,
function_ref<LogicalResult(ValueRange, ValueRange)>
checkCommutativeEquivalent) { … }
bool OperationEquivalence::isEquivalentTo(Operation *lhs,
Operation *rhs,
Flags flags) { … }
template <typename T>
static void addDataToHash(llvm::SHA1 &hasher, const T &data) { … }
OperationFingerPrint::OperationFingerPrint(Operation *topOp,
bool includeNested) { … }