MLIR 22.0.0git
MLIRContext.cpp File Reference
#include "mlir/IR/MLIRContext.h"
#include "AffineExprDetail.h"
#include "AffineMapDetail.h"
#include "AttributeDetail.h"
#include "IntegerSetDetail.h"
#include "TypeDetail.h"
#include "mlir/IR/Action.h"
#include "mlir/IR/AffineExpr.h"
#include "mlir/IR/AffineMap.h"
#include "mlir/IR/Attributes.h"
#include "mlir/IR/BuiltinAttributes.h"
#include "mlir/IR/BuiltinDialect.h"
#include "mlir/IR/Diagnostics.h"
#include "mlir/IR/Dialect.h"
#include "mlir/IR/ExtensibleDialect.h"
#include "mlir/IR/IntegerSet.h"
#include "mlir/IR/Location.h"
#include "mlir/IR/OpImplementation.h"
#include "mlir/IR/OperationSupport.h"
#include "mlir/IR/Remarks.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/Twine.h"
#include "llvm/Support/Allocator.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/Compiler.h"
#include "llvm/Support/DebugLog.h"
#include "llvm/Support/ManagedStatic.h"
#include "llvm/Support/Mutex.h"
#include "llvm/Support/RWMutex.h"
#include "llvm/Support/ThreadPool.h"
#include "llvm/Support/raw_ostream.h"
#include <memory>
#include <optional>

Go to the source code of this file.

Classes

class  mlir::MLIRContextImpl
 This is the implementation of the MLIRContext class, using the pImpl idiom. More...

Namespaces

namespace  mlir
 Include the generated interface declarations.

Macros

#define DEBUG_TYPE   "mlircontext"

Functions

static bool isThreadingGloballyDisabled ()
template<typename T>
static ArrayRef< T > copyArrayRefInto (llvm::BumpPtrAllocator &allocator, ArrayRef< T > elements)
 Copy the specified array of elements into memory managed by the provided bump pointer allocator.
static IntegerType getCachedIntegerType (unsigned width, IntegerType::SignednessSemantics signedness, MLIRContext *context)
 Return an existing integer type instance if one is cached within the context.
static bool willBeValidAffineMap (unsigned dimCount, unsigned symbolCount, ArrayRef< AffineExpr > results)
 Check whether the arguments passed to the AffineMap::get() are consistent.

Variables

static llvm::ManagedStatic< MLIRContextOptions > clOptions

Macro Definition Documentation

◆ DEBUG_TYPE

#define DEBUG_TYPE   "mlircontext"

Definition at line 43 of file MLIRContext.cpp.

Function Documentation

◆ copyArrayRefInto()

template<typename T>
ArrayRef< T > copyArrayRefInto ( llvm::BumpPtrAllocator & allocator,
ArrayRef< T > elements )
static

Copy the specified array of elements into memory managed by the provided bump pointer allocator.

This assumes the elements are all PODs.

Definition at line 368 of file MLIRContext.cpp.

References result.

◆ getCachedIntegerType()

IntegerType getCachedIntegerType ( unsigned width,
IntegerType::SignednessSemantics signedness,
MLIRContext * context )
static

◆ isThreadingGloballyDisabled()

bool isThreadingGloballyDisabled ( )
static

◆ willBeValidAffineMap()

bool willBeValidAffineMap ( unsigned dimCount,
unsigned symbolCount,
ArrayRef< AffineExpr > results )
static

Check whether the arguments passed to the AffineMap::get() are consistent.

This method checks whether the highest index of dimensional identifier present in result expressions is less than dimCount and the highest index of symbolic identifier present in result expressions is less than symbolCount.

Definition at line 1208 of file MLIRContext.cpp.

References mlir::getMaxDimAndSymbol().

Referenced by mlir::AffineMap::get(), and mlir::AffineMap::get().

Variable Documentation

◆ clOptions

llvm::ManagedStatic<MLIRContextOptions> clOptions
static

Definition at line 75 of file MLIRContext.cpp.