1 //===---------- Polly.cpp - Initialize the Polly Module -------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 //===----------------------------------------------------------------------===//
12 #include "polly/RegisterPasses.h"
13 #include "llvm/Transforms/IPO/PassManagerBuilder.h"
17 /// Initialize Polly passes when library is loaded.
19 /// We use the constructor of a statically declared object to initialize the
20 /// different Polly passes right after the Polly library is loaded. This ensures
21 /// that the Polly passes are available e.g. in the 'opt' tool.
22 class StaticInitializer
{
25 llvm::PassRegistry
&Registry
= *llvm::PassRegistry::getPassRegistry();
26 polly::initializePollyPasses(Registry
);
29 static StaticInitializer InitializeEverything
;
30 } // end of anonymous namespace.