MLIR  16.0.0git
Namespaces | Macros | Functions
UpdateVCEPass.cpp File Reference
#include "mlir/Dialect/SPIRV/Transforms/Passes.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVDialect.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVOps.h"
#include "mlir/Dialect/SPIRV/IR/SPIRVTypes.h"
#include "mlir/Dialect/SPIRV/IR/TargetAndABI.h"
#include "mlir/IR/Builders.h"
#include "mlir/IR/Visitors.h"
#include "llvm/ADT/SetVector.h"
#include "llvm/ADT/SmallSet.h"
#include "llvm/ADT/StringExtras.h"
#include "mlir/Dialect/SPIRV/Transforms/Passes.h.inc"
+ Include dependency graph for UpdateVCEPass.cpp:

Go to the source code of this file.

Namespaces

 mlir
 Include the generated interface declarations.
 
 mlir::spirv
 

Macros

#define GEN_PASS_DEF_SPIRVUPDATEVCE
 

Functions

static LogicalResult checkAndUpdateExtensionRequirements (Operation *op, const spirv::TargetEnv &targetEnv, const spirv::SPIRVType::ExtensionArrayRefVector &candidates, SetVector< spirv::Extension > &deducedExtensions)
 Checks that candidates extension requirements are possible to be satisfied with the given targetEnv and updates deducedExtensions if so. More...
 
static LogicalResult checkAndUpdateCapabilityRequirements (Operation *op, const spirv::TargetEnv &targetEnv, const spirv::SPIRVType::CapabilityArrayRefVector &candidates, SetVector< spirv::Capability > &deducedCapabilities)
 Checks that candidatescapability requirements are possible to be satisfied with the given targetEnv and updates deducedCapabilities if so. More...
 

Macro Definition Documentation

◆ GEN_PASS_DEF_SPIRVUPDATEVCE

#define GEN_PASS_DEF_SPIRVUPDATEVCE

Definition at line 28 of file UpdateVCEPass.cpp.

Function Documentation

◆ checkAndUpdateCapabilityRequirements()

static LogicalResult checkAndUpdateCapabilityRequirements ( Operation op,
const spirv::TargetEnv targetEnv,
const spirv::SPIRVType::CapabilityArrayRefVector candidates,
SetVector< spirv::Capability > &  deducedCapabilities 
)
static

Checks that candidatescapability requirements are possible to be satisfied with the given targetEnv and updates deducedCapabilities if so.

Emits errors attaching to the given op on failures.

candidates is a vector of vector for capability requirements following ((Capability::A OR Capability::B) AND (Capability::C OR Capability::D)) convention.

Definition at line 79 of file UpdateVCEPass.cpp.

References mlir::spirv::TargetEnv::allows(), mlir::Operation::emitError(), mlir::Operation::getName(), and mlir::success().

◆ checkAndUpdateExtensionRequirements()

static LogicalResult checkAndUpdateExtensionRequirements ( Operation op,
const spirv::TargetEnv targetEnv,
const spirv::SPIRVType::ExtensionArrayRefVector candidates,
SetVector< spirv::Extension > &  deducedExtensions 
)
static

Checks that candidates extension requirements are possible to be satisfied with the given targetEnv and updates deducedExtensions if so.

Emits errors attaching to the given op on failures.

candidates is a vector of vector for extension requirements following ((Extension::A OR Extension::B) AND (Extension::C OR Extension::D)) convention.

Definition at line 51 of file UpdateVCEPass.cpp.

References mlir::spirv::TargetEnv::allows(), mlir::Operation::emitError(), mlir::Operation::getName(), and mlir::success().