-
Notifications
You must be signed in to change notification settings - Fork 11.1k
/
Passes.h
51 lines (38 loc) · 1.7 KB
/
Passes.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
//===- Passes.h - SPIR-V pass entry points ----------------------*- C++ -*-===//
//
// 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
//
//===----------------------------------------------------------------------===//
//
// This header file defines prototypes that expose pass constructors.
//
//===----------------------------------------------------------------------===//
#ifndef MLIR_DIALECT_SPIRV_TRANSFORMS_PASSES_H_
#define MLIR_DIALECT_SPIRV_TRANSFORMS_PASSES_H_
#include "mlir/Dialect/SPIRV/IR/SPIRVAttributes.h"
#include "mlir/Pass/Pass.h"
namespace mlir {
class ModuleOp;
namespace spirv {
class ModuleOp;
//===----------------------------------------------------------------------===//
// Passes
//===----------------------------------------------------------------------===//
#define GEN_PASS_DECL
#include "mlir/Dialect/SPIRV/Transforms/Passes.h.inc"
/// Creates an operation pass that unifies access of multiple aliased resources
/// into access of one single resource.
using GetTargetEnvFn = std::function<spirv::TargetEnvAttr(spirv::ModuleOp)>;
std::unique_ptr<OperationPass<spirv::ModuleOp>>
createUnifyAliasedResourcePass(GetTargetEnvFn getTargetEnv = nullptr);
//===----------------------------------------------------------------------===//
// Registration
//===----------------------------------------------------------------------===//
/// Generate the code for registering passes.
#define GEN_PASS_REGISTRATION
#include "mlir/Dialect/SPIRV/Transforms/Passes.h.inc"
} // namespace spirv
} // namespace mlir
#endif // MLIR_DIALECT_SPIRV_TRANSFORMS_PASSES_H_