From f5a4394ad6a402795ee0e5b3c8836b955ba00aed Mon Sep 17 00:00:00 2001 From: Philip Pfaffe Date: Wed, 2 Aug 2017 11:08:01 +0000 Subject: [PATCH] [SD] Set PollyUseRuntimeAliasChecks correctly llvm-svn: 309805 --- polly/include/polly/ScopDetection.h | 1 + polly/lib/Analysis/ScopDetection.cpp | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/polly/include/polly/ScopDetection.h b/polly/include/polly/ScopDetection.h index c674d153ae55..46921cea7030 100644 --- a/polly/include/polly/ScopDetection.h +++ b/polly/include/polly/ScopDetection.h @@ -617,6 +617,7 @@ public: struct ScopAnalysis : public AnalysisInfoMixin { static AnalysisKey Key; using Result = ScopDetection; + ScopAnalysis(); Result run(Function &F, FunctionAnalysisManager &FAM); }; diff --git a/polly/lib/Analysis/ScopDetection.cpp b/polly/lib/Analysis/ScopDetection.cpp index 4039811987d4..a2bbb71b3d89 100644 --- a/polly/lib/Analysis/ScopDetection.cpp +++ b/polly/lib/Analysis/ScopDetection.cpp @@ -1780,6 +1780,11 @@ ScopDetectionWrapperPass::ScopDetectionWrapperPass() : FunctionPass(ID) { if (IgnoreAliasing) PollyUseRuntimeAliasChecks = false; } +ScopAnalysis::ScopAnalysis() { + // Disable runtime alias checks if we ignore aliasing all together. + if (IgnoreAliasing) + PollyUseRuntimeAliasChecks = false; +} void ScopDetectionWrapperPass::releaseMemory() { Result.reset(); }