From efbba72cb282c80bb4bebae0f52e3a43b95fbd55 Mon Sep 17 00:00:00 2001 From: James Molloy Date: Thu, 10 Sep 2015 10:22:12 +0000 Subject: Add GlobalsAA as preserved to a bunch of transforms GlobalsAA must by definition be preserved in function passes, but the passmanager doesn't know that. Make each pass explicitly preserve GlobalsAA. llvm-svn: 247263 --- llvm/lib/Transforms/Scalar/LoopUnswitch.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'llvm/lib/Transforms/Scalar/LoopUnswitch.cpp') diff --git a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp index 7475150b0c2..8aa3c887c24 100644 --- a/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp +++ b/llvm/lib/Transforms/Scalar/LoopUnswitch.cpp @@ -30,6 +30,7 @@ #include "llvm/ADT/STLExtras.h" #include "llvm/ADT/SmallPtrSet.h" #include "llvm/ADT/Statistic.h" +#include "llvm/Analysis/GlobalsModRef.h" #include "llvm/Analysis/AssumptionCache.h" #include "llvm/Analysis/CodeMetrics.h" #include "llvm/Analysis/InstructionSimplify.h" @@ -195,6 +196,7 @@ namespace { AU.addPreserved(); AU.addPreserved(); AU.addRequired(); + AU.addPreserved(); } private: -- cgit v1.2.3