llvm/mlir/lib/Target/LLVMIR/LoopAnnotationImporter.cpp

//===- LoopAnnotationImporter.cpp - Loop annotation import ----------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//

#include "LoopAnnotationImporter.h"
#include "llvm/IR/Constants.h"

usingnamespacemlir;
usingnamespacemlir::LLVM;
usingnamespacemlir::LLVM::detail;

namespace {
/// Helper class that keeps the state of one metadata to attribute conversion.
struct LoopMetadataConversion {};
} // namespace

LogicalResult LoopMetadataConversion::initConversionState() {}

const llvm::MDNode *
LoopMetadataConversion::lookupAndEraseProperty(StringRef name) {}

FailureOr<BoolAttr> LoopMetadataConversion::lookupUnitNode(StringRef name) {}

FailureOr<BoolAttr> LoopMetadataConversion::lookupBooleanUnitNode(
    StringRef enableName, StringRef disableName, bool negated) {}

FailureOr<BoolAttr> LoopMetadataConversion::lookupBoolNode(StringRef name,
                                                           bool negated) {}

FailureOr<BoolAttr>
LoopMetadataConversion::lookupIntNodeAsBoolAttr(StringRef name) {}

FailureOr<IntegerAttr> LoopMetadataConversion::lookupIntNode(StringRef name) {}

FailureOr<llvm::MDNode *> LoopMetadataConversion::lookupMDNode(StringRef name) {}

FailureOr<SmallVector<llvm::MDNode *>>
LoopMetadataConversion::lookupMDNodes(StringRef name) {}

FailureOr<LoopAnnotationAttr>
LoopMetadataConversion::lookupFollowupNode(StringRef name) {}

static bool isEmptyOrNull(const Attribute attr) {}

template <typename T>
static bool isEmptyOrNull(const SmallVectorImpl<T> &vec) {}

/// Helper function that only creates and attribute of type T if all argument
/// conversion were successfull and at least one of them holds a non-null value.
template <typename T, typename... P>
static T createIfNonNull(MLIRContext *ctx, const P &...args) {}

FailureOr<LoopVectorizeAttr> LoopMetadataConversion::convertVectorizeAttr() {}

FailureOr<LoopInterleaveAttr> LoopMetadataConversion::convertInterleaveAttr() {}

FailureOr<LoopUnrollAttr> LoopMetadataConversion::convertUnrollAttr() {}

FailureOr<LoopUnrollAndJamAttr>
LoopMetadataConversion::convertUnrollAndJamAttr() {}

FailureOr<LoopLICMAttr> LoopMetadataConversion::convertLICMAttr() {}

FailureOr<LoopDistributeAttr> LoopMetadataConversion::convertDistributeAttr() {}

FailureOr<LoopPipelineAttr> LoopMetadataConversion::convertPipelineAttr() {}

FailureOr<LoopPeeledAttr> LoopMetadataConversion::convertPeeledAttr() {}

FailureOr<LoopUnswitchAttr> LoopMetadataConversion::convertUnswitchAttr() {}

FailureOr<SmallVector<AccessGroupAttr>>
LoopMetadataConversion::convertParallelAccesses() {}

FusedLoc LoopMetadataConversion::convertStartLoc() {}

FailureOr<FusedLoc> LoopMetadataConversion::convertEndLoc() {}

LoopAnnotationAttr LoopMetadataConversion::convert() {}

LoopAnnotationAttr
LoopAnnotationImporter::translateLoopAnnotation(const llvm::MDNode *node,
                                                Location loc) {}

LogicalResult
LoopAnnotationImporter::translateAccessGroup(const llvm::MDNode *node,
                                             Location loc) {}

FailureOr<SmallVector<AccessGroupAttr>>
LoopAnnotationImporter::lookupAccessGroupAttrs(const llvm::MDNode *node) const {}