1//===--- Canonicalization.h - Set of canonicalization passes ----*- 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#ifndef POLLY_CANONICALIZATION_H
10#define POLLY_CANONICALIZATION_H
11
12#include "llvm/Passes/PassBuilder.h"
13
14namespace llvm {
15namespace legacy {
16class PassManagerBase;
17}
18} // namespace llvm
19
20namespace polly {
21
22/// Schedule a set of canonicalization passes to prepare for Polly.
23///
24/// The set of optimization passes was partially taken/copied from the
25/// set of default optimization passes in LLVM. It is used to bring the code
26/// into a canonical form that simplifies the analysis and optimization passes
27/// of Polly. The set of optimization passes scheduled here is probably not yet
28/// optimal. TODO: Optimize the set of canonicalization passes.
29void registerCanonicalicationPasses(llvm::legacy::PassManagerBase &PM);
30
31llvm::FunctionPassManager
32buildCanonicalicationPassesForNPM(llvm::ModulePassManager &MPM,
33 llvm::OptimizationLevel Level);
34
35} // namespace polly
36
37#endif
38

source code of polly/include/polly/Canonicalization.h