[PATCH] D24094: LoopLoadElimination should preserve GlobalsAA.

Eli Friedman via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 31 11:01:19 PDT 2016


efriedma created this revision.
efriedma added reviewers: anemet, hfinkel, chandlerc.
efriedma added a subscriber: llvm-commits.
efriedma set the repository for this revision to rL LLVM.
Herald added a subscriber: mzolotukhin.

Avoids losing GlobalsAA in the standard pass pipeline.

Repository:
  rL LLVM

https://reviews.llvm.org/D24094

Files:
  lib/Transforms/Scalar/LoopLoadElimination.cpp

Index: lib/Transforms/Scalar/LoopLoadElimination.cpp
===================================================================
--- lib/Transforms/Scalar/LoopLoadElimination.cpp
+++ lib/Transforms/Scalar/LoopLoadElimination.cpp
@@ -21,6 +21,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Analysis/GlobalsModRef.h"
 #include "llvm/Analysis/LoopAccessAnalysis.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/ScalarEvolutionExpander.h"
@@ -580,6 +581,7 @@
     AU.addRequired<ScalarEvolutionWrapperPass>();
     AU.addRequired<DominatorTreeWrapperPass>();
     AU.addPreserved<DominatorTreeWrapperPass>();
+    AU.addPreserved<GlobalsAAWrapperPass>();
   }
 
   static char ID;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24094.69886.patch
Type: text/x-patch
Size: 776 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20160831/45ebb273/attachment.bin>


More information about the llvm-commits mailing list