clang 24.0.0git
Passes.h
Go to the documentation of this file.
1//===- Passes.h - CIR pass entry points -------------------------*- 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// This header file defines prototypes that expose pass constructors.
10//
11//===----------------------------------------------------------------------===//
12
13#ifndef CLANG_CIR_DIALECT_PASSES_H
14#define CLANG_CIR_DIALECT_PASSES_H
15
16#include "mlir/Pass/Pass.h"
17#include "llvm/ABI/TargetInfo.h"
18
19namespace cir {
20/// The ABI target whose calling-convention rules drive CallConvLowering.
21/// None is the unset state used when the pass runs in classification-attr
22/// mode instead of selecting a target.
23enum class CallConvTarget { None, Test, X86_64 };
24} // namespace cir
25
26namespace clang {
27class ASTContext;
28}
29
30namespace mlir {
31
32std::unique_ptr<Pass> createCIRCanonicalizePass();
33std::unique_ptr<Pass> createCIRFlattenCFGPass();
34std::unique_ptr<Pass> createCIRSimplifyPass();
35std::unique_ptr<Pass> createCIREHABILoweringPass();
36std::unique_ptr<Pass> createCXXABILoweringPass();
37std::unique_ptr<Pass> createTargetLoweringPass();
38std::unique_ptr<Pass> createCallConvLoweringPass();
39std::unique_ptr<Pass>
41 llvm::abi::X86AVXABILevel x86AvxAbiLevel);
42std::unique_ptr<Pass> createHoistAllocasPass();
43std::unique_ptr<Pass> createLoweringPreparePass();
44std::unique_ptr<Pass> createLoweringPreparePass(clang::ASTContext *astCtx);
45std::unique_ptr<Pass> createGotoSolverPass();
46std::unique_ptr<Pass> createIdiomRecognizerPass();
47std::unique_ptr<Pass> createLibOptPass();
48std::unique_ptr<Pass> createLibOptPass(clang::ASTContext *astCtx);
49
50void populateCIRPreLoweringPasses(mlir::OpPassManager &pm);
51
52//===----------------------------------------------------------------------===//
53// Registration
54//===----------------------------------------------------------------------===//
55
56void registerCIRDialectTranslation(mlir::MLIRContext &context);
57
58/// Generate the code for registering passes.
59#define GEN_PASS_REGISTRATION
60#include "clang/CIR/Dialect/Passes.h.inc"
61
62} // namespace mlir
63
64#endif // CLANG_CIR_DIALECT_PASSES_H
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
Definition ASTContext.h:223
CallConvTarget
The ABI target whose calling-convention rules drive CallConvLowering.
Definition Passes.h:23
The JSON file list parser is used to communicate input to InstallAPI.
std::unique_ptr< Pass > createCallConvLoweringPass()
std::unique_ptr< Pass > createCIREHABILoweringPass()
std::unique_ptr< Pass > createCIRCanonicalizePass()
std::unique_ptr< Pass > createCIRFlattenCFGPass()
std::unique_ptr< Pass > createLibOptPass()
Definition LibOpt.cpp:75
std::unique_ptr< Pass > createIdiomRecognizerPass()
void populateCIRPreLoweringPasses(mlir::OpPassManager &pm)
std::unique_ptr< Pass > createTargetLoweringPass()
std::unique_ptr< Pass > createGotoSolverPass()
std::unique_ptr< Pass > createLoweringPreparePass()
std::unique_ptr< Pass > createCIRSimplifyPass()
std::unique_ptr< Pass > createCXXABILoweringPass()
std::unique_ptr< Pass > createHoistAllocasPass()
void registerCIRDialectTranslation(mlir::MLIRContext &context)