From 1bf6bafb2d47867d19f5b9e666e3195b776c0bf7 Mon Sep 17 00:00:00 2001 From: Michael Kruse Date: Wed, 2 Mar 2016 14:59:16 +0000 Subject: [PATCH] Fix: Add pass manager barrier. The LNT test suite with -polly-process-unprofitable -polly-position=before-vectorizer currenty fails 59 tests. With this barrier added, only 16 keep failing. This is probably because Polly's code generation currently does not correctly preserve all analyses it promised to preserve. Temporarily add this barrier until further investigation. llvm-svn: 262488 --- polly/lib/Support/RegisterPasses.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/polly/lib/Support/RegisterPasses.cpp b/polly/lib/Support/RegisterPasses.cpp index e2f3349..2a59fd9 100644 --- a/polly/lib/Support/RegisterPasses.cpp +++ b/polly/lib/Support/RegisterPasses.cpp @@ -30,6 +30,7 @@ #include "polly/ScopInfo.h" #include "llvm/Analysis/CFGPrinter.h" #include "llvm/IR/LegacyPassManager.h" +#include "llvm/Transforms/IPO.h" #include "llvm/Transforms/IPO/PassManagerBuilder.h" #include "llvm/Transforms/Scalar.h" #include "llvm/Transforms/Vectorize.h" @@ -226,6 +227,11 @@ void registerPollyPasses(llvm::legacy::PassManagerBase &PM) { break; } + // FIXME: This dummy ModulePass keeps some programs from miscompiling, + // probably some not correctly preserved analyses. It acts as a barrier to + // force all analysis results to be recomputed. + PM.add(createBarrierNoopPass()); + if (CFGPrinter) PM.add(llvm::createCFGPrinterPass()); } -- 2.7.4