MLIR 22.0.0git
LoopAnnotationImporter.cpp File Reference
#include "LoopAnnotationImporter.h"
#include "llvm/IR/Constants.h"

Go to the source code of this file.

Functions

static bool isEmptyOrNull (const Attribute attr)
template<typename T>
static bool isEmptyOrNull (const SmallVectorImpl< T > &vec)
template<typename T, typename... P>
static T createIfNonNull (MLIRContext *ctx, const P &...args)
 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.

Function Documentation

◆ createIfNonNull()

template<typename T, typename... P>
T createIfNonNull ( MLIRContext * ctx,
const P &... args )
static

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.

Definition at line 275 of file LoopAnnotationImporter.cpp.

References isEmptyOrNull().

◆ isEmptyOrNull() [1/2]

bool isEmptyOrNull ( const Attribute attr)
static

Definition at line 265 of file LoopAnnotationImporter.cpp.

Referenced by createIfNonNull().

◆ isEmptyOrNull() [2/2]

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

Definition at line 268 of file LoopAnnotationImporter.cpp.