MLIR 22.0.0git
SCFToSPIRV.h
Go to the documentation of this file.
1//===- SCFToSPIRV.h - SCF to SPIR-V Patterns --------------------*- C++ -*-===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8//
9// Provides patterns to convert SCF dialect to SPIR-V dialect.
10//
11//===----------------------------------------------------------------------===//
12#ifndef MLIR_CONVERSION_SCFTOSPIRV_SCFTOSPIRV_H_
13#define MLIR_CONVERSION_SCFTOSPIRV_SCFTOSPIRV_H_
14
15#include <memory>
16
17namespace mlir {
18class Pass;
19
20// Owning list of rewriting patterns.
24
28
29 ScfToSPIRVContextImpl *getImpl() { return impl.get(); }
30
31private:
32 std::unique_ptr<ScfToSPIRVContextImpl> impl;
33};
34
35/// Collects a set of patterns to lower from scf.for, scf.if, and
36/// loop.terminator to CFG operations within the SPIR-V dialect.
37void populateSCFToSPIRVPatterns(const SPIRVTypeConverter &typeConverter,
38 ScfToSPIRVContext &scfToSPIRVContext,
39 RewritePatternSet &patterns);
40} // namespace mlir
41
42#endif // MLIR_CONVERSION_SCFTOSPIRV_SCFTOSPIRV_H_
The abstract base pass class.
Definition Pass.h:51
Type conversion from builtin types to SPIR-V types for shader interface.
Include the generated interface declarations.
const FrozenRewritePatternSet & patterns
void populateSCFToSPIRVPatterns(const SPIRVTypeConverter &typeConverter, ScfToSPIRVContext &scfToSPIRVContext, RewritePatternSet &patterns)
Collects a set of patterns to lower from scf.for, scf.if, and loop.terminator to CFG operations withi...
ScfToSPIRVContext()
We use ScfToSPIRVContext to store information about the lowering of the scf region that need to be us...
ScfToSPIRVContextImpl * getImpl()
Definition SCFToSPIRV.h:29