forked from OSchip/llvm-project
RegisterPasses: Do not claim we schedule canonicalization passes at -O0
Also the code makes the impression this was happening, shouldEnablePolly() always returns false for optlevel equal to zero. This was previously different, but was accidentally changed by a commit a couple of months ago. As this behavior was mainly a debugging tool and adding this to clang never really made sense, we just remove the last traces. llvm-svn: 198370
This commit is contained in:
parent
1fb3362a6e
commit
e61b86c9cd
|
@ -311,9 +311,6 @@ static void registerPollyPasses(llvm::PassManagerBase &PM) {
|
|||
}
|
||||
|
||||
static bool shouldEnablePolly(unsigned OptLevel) {
|
||||
if (OptLevel == 0)
|
||||
return false;
|
||||
|
||||
if (PollyOnlyPrinter || PollyPrinter || PollyOnlyViewer || PollyViewer)
|
||||
PollyTrackFailures = true;
|
||||
|
||||
|
@ -344,22 +341,6 @@ registerPollyEarlyAsPossiblePasses(const llvm::PassManagerBuilder &Builder,
|
|||
registerPollyPasses(PM);
|
||||
}
|
||||
|
||||
static void
|
||||
registerPollyOptLevel0Passes(const llvm::PassManagerBuilder &Builder,
|
||||
llvm::PassManagerBase &PM) {
|
||||
if (shouldEnablePolly(Builder.OptLevel))
|
||||
registerCanonicalicationPasses(PM);
|
||||
}
|
||||
|
||||
/// @brief Register Polly canonicalization passes at opt level '0'
|
||||
///
|
||||
/// At '-O0' we schedule the Polly canonicalization passes. This allows us
|
||||
/// to easily get the canonicalized IR of a program which can then be used
|
||||
/// with the Polly passes of the 'opt' optimizer.
|
||||
static llvm::RegisterStandardPasses
|
||||
RegisterPollyCanonicalizer(llvm::PassManagerBuilder::EP_EnabledOnOptLevel0,
|
||||
registerPollyOptLevel0Passes);
|
||||
|
||||
/// @brief Register Polly to be available as an optimizer
|
||||
///
|
||||
/// We currently register Polly such that it runs as early as possible. This has
|
||||
|
|
Loading…
Reference in New Issue