Index: lib/CodeGen/PPCGCodeGeneration.cpp =================================================================== --- lib/CodeGen/PPCGCodeGeneration.cpp +++ lib/CodeGen/PPCGCodeGeneration.cpp @@ -93,6 +93,13 @@ " declared as managed memory"), cl::Hidden, cl::init(false), cl::ZeroOrMore, cl::cat(PollyCategory)); +static cl::opt + FailOnStoredScalar("polly-acc-fail-on-stored-scalar", + cl::desc("Fail and generate a backtrace if" + " we have scalar stores in a kernel that " + " prevents us from parallelising "), + cl::Hidden, cl::init(false), cl::ZeroOrMore, + cl::cat(PollyCategory)); static cl::opt FailOnVerifyModuleFailure("polly-acc-fail-on-verify-module-failure", @@ -2052,6 +2059,10 @@ Value *Val = Builder.CreateLoad(Alloca); Builder.CreateStore(Val, TypedArgPtr); StoredScalar = true; + if (FailOnStoredScalar) + report_fatal_error("Failed because of stored Scalar in Scop: " + + S.getFunction().getName() + + " | Region: " + S.getName()); Arg++; }