1 //===---------- Polly.cpp - Initialize the Polly Module -------------------===//
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
7 //===----------------------------------------------------------------------===//
9 //===----------------------------------------------------------------------===//
11 #include "polly/RegisterPasses.h"
12 #include "llvm/PassRegistry.h"
16 /// Initialize Polly passes when library is loaded.
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
{
24 llvm::PassRegistry
&Registry
= *llvm::PassRegistry::getPassRegistry();
25 polly::initializePollyPasses(Registry
);
28 static StaticInitializer InitializeEverything
;
29 } // end of anonymous namespace.