Subversion Repositories QNX 8.QNX8 LLVM/Clang compiler suite

Rev

Blame | Last modification | View Log | Download | RSS feed

  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.  
  14. namespace llvm {
  15. namespace legacy {
  16. class PassManagerBase;
  17. }
  18. } // namespace llvm
  19.  
  20. namespace 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.
  29. void registerCanonicalicationPasses(llvm::legacy::PassManagerBase &PM);
  30.  
  31. llvm::FunctionPassManager
  32. buildCanonicalicationPassesForNPM(llvm::ModulePassManager &MPM,
  33.                                   llvm::OptimizationLevel Level);
  34.  
  35. } // namespace polly
  36.  
  37. #endif
  38.