Fix Polly
[polly-mirror.git] / lib / Polly.cpp
blobe6bae931fc5db39c30937f92ac9b68cdadce9f42
1 //===---------- Polly.cpp - Initialize the Polly Module -------------------===//
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 //===----------------------------------------------------------------------===//
11 #include "polly/RegisterPasses.h"
12 #include "llvm/PassRegistry.h"
14 namespace {
16 /// Initialize Polly passes when library is loaded.
17 ///
18 /// We use the constructor of a statically declared object to initialize the
19 /// different Polly passes right after the Polly library is loaded. This ensures
20 /// that the Polly passes are available e.g. in the 'opt' tool.
21 class StaticInitializer {
22 public:
23 StaticInitializer() {
24 llvm::PassRegistry &Registry = *llvm::PassRegistry::getPassRegistry();
25 polly::initializePollyPasses(Registry);
28 static StaticInitializer InitializeEverything;
29 } // end of anonymous namespace.