Polly 19.0.0git
Namespaces | Macros | Enumerations | Functions
RegisterPasses.cpp File Reference
#include "polly/RegisterPasses.h"
#include "polly/Canonicalization.h"
#include "polly/CodeGen/CodeGeneration.h"
#include "polly/CodeGen/IslAst.h"
#include "polly/CodePreparation.h"
#include "polly/DeLICM.h"
#include "polly/DeadCodeElimination.h"
#include "polly/DependenceInfo.h"
#include "polly/ForwardOpTree.h"
#include "polly/JSONExporter.h"
#include "polly/LinkAllPasses.h"
#include "polly/MaximalStaticExpansion.h"
#include "polly/PolyhedralInfo.h"
#include "polly/PruneUnprofitable.h"
#include "polly/ScheduleOptimizer.h"
#include "polly/ScopDetection.h"
#include "polly/ScopGraphPrinter.h"
#include "polly/ScopInfo.h"
#include "polly/Simplify.h"
#include "polly/Support/DumpFunctionPass.h"
#include "polly/Support/DumpModulePass.h"
#include "llvm/Analysis/CFGPrinter.h"
#include "llvm/IR/LegacyPassManager.h"
#include "llvm/IR/PassManager.h"
#include "llvm/IR/Verifier.h"
#include "llvm/Passes/PassBuilder.h"
#include "llvm/Passes/PassPlugin.h"
#include "llvm/Support/CommandLine.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Transforms/IPO.h"
#include "PollyPasses.def"

Go to the source code of this file.

Namespaces

namespace  polly
 

Macros

#define SCOP_ANALYSIS(NAME, CREATE_PASS)
 
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)    FAM.registerPass([] { return CREATE_PASS; });
 
#define FUNCTION_ANALYSIS(NAME, CREATE_PASS)
 
#define FUNCTION_PASS(NAME, CREATE_PASS)
 
#define SCOP_ANALYSIS(NAME, CREATE_PASS)
 
#define SCOP_PASS(NAME, CREATE_PASS)
 
#define SCOP_ANALYSIS(NAME, CREATE_PASS)
 
#define SCOP_PASS(NAME, CREATE_PASS)
 

Enumerations

enum  polly::PassPositionChoice { polly::POSITION_EARLY , polly::POSITION_BEFORE_VECTORIZER }
 
enum  polly::OptimizerChoice { polly::OPTIMIZER_NONE , polly::OPTIMIZER_ISL }
 
enum  polly::CodeGenChoice { polly::CODEGEN_FULL , polly::CODEGEN_AST , polly::CODEGEN_NONE }
 

Functions

cl::OptionCategory PollyCategory ("Polly Options", "Configure the polly loop optimizer")
 
static cl::opt< bool > polly::PollyEnabled ("polly", cl::desc("Enable the polly optimizer (with -O1, -O2 or -O3)"), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::PollyDetectOnly ("polly-only-scop-detection", cl::desc("Only run scop detection, but no other optimizations"), cl::cat(PollyCategory))
 
static cl::opt< PassPositionChoice > polly::PassPosition ("polly-position", cl::desc("Where to run polly in the pass pipeline"), cl::values(clEnumValN(POSITION_EARLY, "early", "Before everything"), clEnumValN(POSITION_BEFORE_VECTORIZER, "before-vectorizer", "Right before the vectorizer")), cl::Hidden, cl::init(POSITION_BEFORE_VECTORIZER), cl::cat(PollyCategory))
 
static cl::opt< OptimizerChoice > polly::Optimizer ("polly-optimizer", cl::desc("Select the scheduling optimizer"), cl::values(clEnumValN(OPTIMIZER_NONE, "none", "No optimizer"), clEnumValN(OPTIMIZER_ISL, "isl", "The isl scheduling optimizer")), cl::Hidden, cl::init(OPTIMIZER_ISL), cl::cat(PollyCategory))
 
static cl::opt< CodeGenChoice > polly::CodeGeneration ("polly-code-generation", cl::desc("How much code-generation to perform"), cl::values(clEnumValN(CODEGEN_FULL, "full", "AST and IR generation"), clEnumValN(CODEGEN_AST, "ast", "Only AST generation"), clEnumValN(CODEGEN_NONE, "none", "No code generation")), cl::Hidden, cl::init(CODEGEN_FULL), cl::cat(PollyCategory))
 
static cl::opt< VectorizerChoice, true > polly::Vectorizer ("polly-vectorizer", cl::desc("Select the vectorization strategy"), cl::values(clEnumValN(VECTORIZER_NONE, "none", "No Vectorization"), clEnumValN(VECTORIZER_STRIPMINE, "stripmine", "Strip-mine outer loops for the loop-vectorizer to trigger")), cl::location(PollyVectorizerChoice), cl::init(VECTORIZER_NONE), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::ImportJScop ("polly-import", cl::desc("Import the polyhedral description of the detected Scops"), cl::Hidden, cl::cat(PollyCategory))
 
static cl::opt< bool > polly::FullyIndexedStaticExpansion ("polly-enable-mse", cl::desc("Fully expand the memory accesses of the detected Scops"), cl::Hidden, cl::cat(PollyCategory))
 
static cl::opt< bool > polly::ExportJScop ("polly-export", cl::desc("Export the polyhedral description of the detected Scops"), cl::Hidden, cl::cat(PollyCategory))
 
static cl::opt< bool > polly::DeadCodeElim ("polly-run-dce", cl::desc("Run the dead code elimination"), cl::Hidden, cl::cat(PollyCategory))
 
static cl::opt< bool > polly::PollyViewer ("polly-show", cl::desc("Highlight the code regions that will be optimized in a " "(CFG BBs and LLVM-IR instructions)"), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::PollyOnlyViewer ("polly-show-only", cl::desc("Highlight the code regions that will be optimized in " "a (CFG only BBs)"), cl::init(false), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::PollyPrinter ("polly-dot", cl::desc("Enable the Polly DOT printer in -O3"), cl::Hidden, cl::value_desc("Run the Polly DOT printer at -O3"), cl::init(false), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::PollyOnlyPrinter ("polly-dot-only", cl::desc("Enable the Polly DOT printer in -O3 (no BB content)"), cl::Hidden, cl::value_desc("Run the Polly DOT printer at -O3 (no BB content"), cl::init(false), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::CFGPrinter ("polly-view-cfg", cl::desc("Show the Polly CFG right after code generation"), cl::Hidden, cl::init(false), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::EnableForwardOpTree ("polly-enable-optree", cl::desc("Enable operand tree forwarding"), cl::Hidden, cl::init(true), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::DumpBefore ("polly-dump-before", cl::desc("Dump module before Polly transformations into a file " "suffixed with \"-before\""), cl::init(false), cl::cat(PollyCategory))
 
static cl::list< std::string > polly::DumpBeforeFile ("polly-dump-before-file", cl::desc("Dump module before Polly transformations to the given file"), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::DumpAfter ("polly-dump-after", cl::desc("Dump module after Polly transformations into a file " "suffixed with \"-after\""), cl::init(false), cl::cat(PollyCategory))
 
static cl::list< std::string > polly::DumpAfterFile ("polly-dump-after-file", cl::desc("Dump module after Polly transformations to the given file"), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::EnableDeLICM ("polly-enable-delicm", cl::desc("Eliminate scalar loop carried dependences"), cl::Hidden, cl::init(true), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::EnableSimplify ("polly-enable-simplify", cl::desc("Simplify SCoP after optimizations"), cl::init(true), cl::cat(PollyCategory))
 
static cl::opt< bool > polly::EnablePruneUnprofitable ("polly-enable-prune-unprofitable", cl::desc("Bail out on unprofitable SCoPs before rescheduling"), cl::Hidden, cl::init(true), cl::cat(PollyCategory))
 
void polly::initializePollyPasses (llvm::PassRegistry &Registry)
 
static bool polly::shouldEnablePollyForOptimization ()
 
static bool polly::shouldEnablePollyForDiagnostic ()
 
static void polly::buildCommonPollyPipeline (FunctionPassManager &PM, OptimizationLevel Level, bool EnableForOpt)
 Register Polly passes such that they form a polyhedral optimizer.
 
static void polly::buildEarlyPollyPipeline (llvm::ModulePassManager &MPM, llvm::OptimizationLevel Level)
 
static void polly::buildLatePollyPipeline (FunctionPassManager &PM, llvm::OptimizationLevel Level)
 
static OwningScopAnalysisManagerFunctionProxy polly::createScopAnalyses (FunctionAnalysisManager &FAM, PassInstrumentationCallbacks *PIC)
 
static void polly::registerFunctionAnalyses (FunctionAnalysisManager &FAM, PassInstrumentationCallbacks *PIC)
 
static bool polly::parseFunctionPipeline (StringRef Name, FunctionPassManager &FPM, ArrayRef< PassBuilder::PipelineElement > Pipeline)
 
static bool polly::parseScopPass (StringRef Name, ScopPassManager &SPM, PassInstrumentationCallbacks *PIC)
 
static bool polly::parseScopPipeline (StringRef Name, FunctionPassManager &FPM, PassInstrumentationCallbacks *PIC, ArrayRef< PassBuilder::PipelineElement > Pipeline)
 
static bool polly::isScopPassName (StringRef Name)
 
static bool polly::parseTopLevelPipeline (llvm::ModulePassManager &MPM, PassInstrumentationCallbacks *PIC, ArrayRef< PassBuilder::PipelineElement > Pipeline)
 
void polly::registerPollyPasses (PassBuilder &PB)
 Register Polly to be available as an optimizer.
 
llvm::PassPluginLibraryInfo getPollyPluginInfo ()
 

Macro Definition Documentation

◆ FUNCTION_ANALYSIS [1/2]

#define FUNCTION_ANALYSIS (   NAME,
  CREATE_PASS 
)     FAM.registerPass([] { return CREATE_PASS; });

◆ FUNCTION_ANALYSIS [2/2]

#define FUNCTION_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (llvm::parseAnalysisUtilityPasses< \
std::remove_reference<decltype(CREATE_PASS)>::type>(NAME, Name, \
FPM)) \
return true;
enum isl_fold type
Definition: isl_test.c:4017

◆ FUNCTION_PASS

#define FUNCTION_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
FPM.addPass(CREATE_PASS); \
return true; \
}

◆ SCOP_ANALYSIS [1/3]

#define SCOP_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
Proxy.getManager().registerPass([PIC] { \
(void)PIC; \
return CREATE_PASS; \
});

◆ SCOP_ANALYSIS [2/3]

#define SCOP_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (llvm::parseAnalysisUtilityPasses< \
std::remove_reference<decltype(CREATE_PASS)>::type>(NAME, Name, \
SPM)) \
return true;

◆ SCOP_ANALYSIS [3/3]

#define SCOP_ANALYSIS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == "require<" NAME ">") \
return true; \
if (Name == "invalidate<" NAME ">") \
return true;

◆ SCOP_PASS [1/2]

#define SCOP_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) { \
SPM.addPass(CREATE_PASS); \
return true; \
}

◆ SCOP_PASS [2/2]

#define SCOP_PASS (   NAME,
  CREATE_PASS 
)
Value:
if (Name == NAME) \
return true;

Function Documentation

◆ getPollyPluginInfo()

llvm::PassPluginLibraryInfo getPollyPluginInfo ( )

Definition at line 621 of file RegisterPasses.cpp.

References polly::registerPollyPasses().

Referenced by llvmGetPassPluginInfo().

◆ PollyCategory()

cl::OptionCategory PollyCategory ( "Polly Options"  ,
"Configure the polly loop optimizer"   
)