]> granicus.if.org Git - llvm/commitdiff
MemorySSA: Move to Analysis, from Transforms/Utils. It's used as
authorDaniel Berlin <dberlin@dberlin.org>
Tue, 11 Apr 2017 20:06:36 +0000 (20:06 +0000)
committerDaniel Berlin <dberlin@dberlin.org>
Tue, 11 Apr 2017 20:06:36 +0000 (20:06 +0000)
Analysis, it has Analysis passes, and once NewGVN is made an Analysis,
this removes the cross dependency from Analysis to Transform/Utils.
NFC.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@299980 91177308-0d34-0410-b5e6-96231b3b80d8

38 files changed:
include/llvm/Analysis/MemorySSA.h [moved from include/llvm/Transforms/Utils/MemorySSA.h with 99% similarity]
include/llvm/Analysis/MemorySSAUpdater.h [moved from include/llvm/Transforms/Utils/MemorySSAUpdater.h with 97% similarity]
include/llvm/Transforms/Scalar/GVNExpression.h
lib/Analysis/Analysis.cpp
lib/Analysis/CMakeLists.txt
lib/Analysis/MemorySSA.cpp [moved from lib/Transforms/Utils/MemorySSA.cpp with 99% similarity]
lib/Analysis/MemorySSAUpdater.cpp [moved from lib/Transforms/Utils/MemorySSAUpdater.cpp with 99% similarity]
lib/Passes/PassBuilder.cpp
lib/Transforms/Scalar/EarlyCSE.cpp
lib/Transforms/Scalar/GVNHoist.cpp
lib/Transforms/Scalar/NewGVN.cpp
lib/Transforms/Utils/CMakeLists.txt
lib/Transforms/Utils/Utils.cpp
test/Analysis/MemorySSA/assume.ll [moved from test/Transforms/Util/MemorySSA/assume.ll with 100% similarity]
test/Analysis/MemorySSA/atomic-clobber.ll [moved from test/Transforms/Util/MemorySSA/atomic-clobber.ll with 100% similarity]
test/Analysis/MemorySSA/basicaa-memcpy.ll [moved from test/Transforms/Util/MemorySSA/basicaa-memcpy.ll with 100% similarity]
test/Analysis/MemorySSA/constant-memory.ll [moved from test/Transforms/Util/MemorySSA/constant-memory.ll with 100% similarity]
test/Analysis/MemorySSA/cyclicphi.ll [moved from test/Transforms/Util/MemorySSA/cyclicphi.ll with 100% similarity]
test/Analysis/MemorySSA/forward-unreachable.ll [moved from test/Transforms/Util/MemorySSA/forward-unreachable.ll with 100% similarity]
test/Analysis/MemorySSA/function-clobber.ll [moved from test/Transforms/Util/MemorySSA/function-clobber.ll with 100% similarity]
test/Analysis/MemorySSA/function-mem-attrs.ll [moved from test/Transforms/Util/MemorySSA/function-mem-attrs.ll with 100% similarity]
test/Analysis/MemorySSA/invariant-groups.ll [moved from test/Transforms/Util/MemorySSA/invariant-groups.ll with 100% similarity]
test/Analysis/MemorySSA/lifetime-simple.ll [moved from test/Transforms/Util/MemorySSA/lifetime-simple.ll with 100% similarity]
test/Analysis/MemorySSA/load-invariant.ll [moved from test/Transforms/Util/MemorySSA/load-invariant.ll with 100% similarity]
test/Analysis/MemorySSA/many-dom-backedge.ll [moved from test/Transforms/Util/MemorySSA/many-dom-backedge.ll with 100% similarity]
test/Analysis/MemorySSA/many-doms.ll [moved from test/Transforms/Util/MemorySSA/many-doms.ll with 100% similarity]
test/Analysis/MemorySSA/multi-edges.ll [moved from test/Transforms/Util/MemorySSA/multi-edges.ll with 100% similarity]
test/Analysis/MemorySSA/multiple-backedges-hal.ll [moved from test/Transforms/Util/MemorySSA/multiple-backedges-hal.ll with 100% similarity]
test/Analysis/MemorySSA/multiple-locations.ll [moved from test/Transforms/Util/MemorySSA/multiple-locations.ll with 100% similarity]
test/Analysis/MemorySSA/no-disconnected.ll [moved from test/Transforms/Util/MemorySSA/no-disconnected.ll with 100% similarity]
test/Analysis/MemorySSA/optimize-use.ll [moved from test/Transforms/Util/MemorySSA/optimize-use.ll with 100% similarity]
test/Analysis/MemorySSA/phi-translation.ll [moved from test/Transforms/Util/MemorySSA/phi-translation.ll with 100% similarity]
test/Analysis/MemorySSA/pr28880.ll [moved from test/Transforms/Util/MemorySSA/pr28880.ll with 100% similarity]
test/Analysis/MemorySSA/ptr-const-mem.ll [moved from test/Transforms/Util/MemorySSA/ptr-const-mem.ll with 100% similarity]
test/Analysis/MemorySSA/volatile-clobber.ll [moved from test/Transforms/Util/MemorySSA/volatile-clobber.ll with 100% similarity]
unittests/Analysis/CMakeLists.txt
unittests/Analysis/MemorySSA.cpp [moved from unittests/Transforms/Utils/MemorySSA.cpp with 99% similarity]
unittests/Transforms/Utils/CMakeLists.txt

similarity index 99%
rename from include/llvm/Transforms/Utils/MemorySSA.h
rename to include/llvm/Analysis/MemorySSA.h
index b16826b1ccb06103c3847e54916e7cc598807ca6..db31ae9f4f109196e70da6cf6556c0aa1bb8ac96 100644 (file)
@@ -69,8 +69,8 @@
 /// per instruction.
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TRANSFORMS_UTILS_MEMORYSSA_H
-#define LLVM_TRANSFORMS_UTILS_MEMORYSSA_H
+#ifndef LLVM_ANALYSIS_MEMORYSSA_H
+#define LLVM_ANALYSIS_MEMORYSSA_H
 
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/GraphTraits.h"
@@ -1152,4 +1152,4 @@ inline iterator_range<def_chain_iterator<T, true>> optimized_def_chain(T MA) {
 
 } // end namespace llvm
 
-#endif // LLVM_TRANSFORMS_UTILS_MEMORYSSA_H
+#endif // LLVM_ANALYSIS_MEMORYSSA_H
similarity index 97%
rename from include/llvm/Transforms/Utils/MemorySSAUpdater.h
rename to include/llvm/Analysis/MemorySSAUpdater.h
index 91e6fbe50b86e9c6023c822b69bfc6ad40717b9e..d30eeeaa95b6a54a91efa45d0a7322271b75a013 100644 (file)
@@ -29,8 +29,8 @@
 //
 //===----------------------------------------------------------------------===//
 
-#ifndef LLVM_TRANSFORMS_UTILS_MEMORYSSAUPDATER_H
-#define LLVM_TRANSFORMS_UTILS_MEMORYSSAUPDATER_H
+#ifndef LLVM_ANALYSIS_MEMORYSSAUPDATER_H
+#define LLVM_ANALYSIS_MEMORYSSAUPDATER_H
 
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallVector.h"
@@ -45,7 +45,7 @@
 #include "llvm/Pass.h"
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/ErrorHandling.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
+#include "llvm/Analysis/MemorySSA.h"
 
 namespace llvm {
 
@@ -150,4 +150,4 @@ private:
 };
 } // end namespace llvm
 
-#endif // LLVM_TRANSFORMS_UTILS_MEMORYSSAUPDATER_H
+#endif // LLVM_ANALYSIS_MEMORYSSAUPDATER_H
index 7b5e2faebea33a751cb22fcdd4804c2c48cdd94d..2670a0c1a5339b7cf4b157ce2f65519b9f0b7850 100644 (file)
@@ -18,6 +18,7 @@
 
 #include "llvm/ADT/Hashing.h"
 #include "llvm/ADT/iterator_range.h"
+#include "llvm/Analysis/MemorySSA.h"
 #include "llvm/IR/Constant.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/Value.h"
@@ -26,7 +27,6 @@
 #include "llvm/Support/Casting.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/raw_ostream.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
 #include <algorithm>
 #include <cassert>
 #include <iterator>
index d9af9bb560ab693db540cb240ce391c5f4d328f9..0e0b5c92a918a49a510166df3583ebf32fffc8d7 100644 (file)
@@ -79,6 +79,8 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
   initializeTypeBasedAAWrapperPassPass(Registry);
   initializeScopedNoAliasAAWrapperPassPass(Registry);
   initializeLCSSAVerificationPassPass(Registry);
+  initializeMemorySSAWrapperPassPass(Registry);
+  initializeMemorySSAPrinterLegacyPassPass(Registry);
 }
 
 void LLVMInitializeAnalysis(LLVMPassRegistryRef R) {
index d53364373d7bccdc46e397528f9925702f19c734..161709a48466f8868ca34bc2e945343d4b58310e 100644 (file)
@@ -53,6 +53,8 @@ add_llvm_library(LLVMAnalysis
   MemoryBuiltins.cpp
   MemoryDependenceAnalysis.cpp
   MemoryLocation.cpp
+  MemorySSA.cpp
+  MemorySSAUpdater.cpp
   ModuleDebugInfoPrinter.cpp
   ModuleSummaryAnalysis.cpp
   ObjCARCAliasAnalysis.cpp
similarity index 99%
rename from lib/Transforms/Utils/MemorySSA.cpp
rename to lib/Analysis/MemorySSA.cpp
index b1e9603f533e80838e765359abd1be3b415be93c..910170561abf6cc5d72eea27a124bc16b6f4d7f3 100644 (file)
@@ -10,7 +10,7 @@
 // This file implements the MemorySSA class.
 //
 //===----------------------------------------------------------------===//
-#include "llvm/Transforms/Utils/MemorySSA.h"
+#include "llvm/Analysis/MemorySSA.h"
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/DenseSet.h"
 #include "llvm/ADT/DepthFirstIterator.h"
similarity index 99%
rename from lib/Transforms/Utils/MemorySSAUpdater.cpp
rename to lib/Analysis/MemorySSAUpdater.cpp
index c396bd7350474fbe6a0224b5e5323e8f4b0f1f79..c63677fe5502a893d0730d37bd4565a3f4224a18 100644 (file)
@@ -10,7 +10,7 @@
 // This file implements the MemorySSAUpdater class.
 //
 //===----------------------------------------------------------------===//
-#include "llvm/Transforms/Utils/MemorySSAUpdater.h"
+#include "llvm/Analysis/MemorySSAUpdater.h"
 #include "llvm/ADT/STLExtras.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/SmallSet.h"
@@ -24,7 +24,7 @@
 #include "llvm/IR/Module.h"
 #include "llvm/Support/Debug.h"
 #include "llvm/Support/FormattedStream.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
+#include "llvm/Analysis/MemorySSA.h"
 #include <algorithm>
 
 #define DEBUG_TYPE "memoryssa"
index ac77b1d511bf13de2ef354d8ba6f9d37b4accd9d..0421946a32a69527f8b9c15a24bbbc4c75d23a95 100644 (file)
@@ -39,6 +39,7 @@
 #include "llvm/Analysis/LoopAccessAnalysis.h"
 #include "llvm/Analysis/LoopInfo.h"
 #include "llvm/Analysis/MemoryDependenceAnalysis.h"
+#include "llvm/Analysis/MemorySSA.h"
 #include "llvm/Analysis/ModuleSummaryAnalysis.h"
 #include "llvm/Analysis/OptimizationDiagnosticInfo.h"
 #include "llvm/Analysis/PostDominators.h"
 #include "llvm/Transforms/Utils/LoopSimplify.h"
 #include "llvm/Transforms/Utils/LowerInvoke.h"
 #include "llvm/Transforms/Utils/Mem2Reg.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
 #include "llvm/Transforms/Utils/NameAnonGlobals.h"
 #include "llvm/Transforms/Utils/PredicateInfo.h"
 #include "llvm/Transforms/Utils/SimplifyInstructions.h"
index 50141e4def9eb78f2da943f394cb005fc3625674..04479b6e49ac8513a468c14ba8ededc9712fcbd9 100644 (file)
@@ -19,6 +19,8 @@
 #include "llvm/Analysis/AssumptionCache.h"
 #include "llvm/Analysis/GlobalsModRef.h"
 #include "llvm/Analysis/InstructionSimplify.h"
+#include "llvm/Analysis/MemorySSA.h"
+#include "llvm/Analysis/MemorySSAUpdater.h"
 #include "llvm/Analysis/TargetLibraryInfo.h"
 #include "llvm/Analysis/TargetTransformInfo.h"
 #include "llvm/IR/DataLayout.h"
@@ -32,8 +34,6 @@
 #include "llvm/Support/raw_ostream.h"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Utils/Local.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
-#include "llvm/Transforms/Utils/MemorySSAUpdater.h"
 #include <deque>
 using namespace llvm;
 using namespace llvm::PatternMatch;
index 2797869851d2b92d614f31634d060f235ccfaebf..6adfe130d148b6e41ae488cb0f5e41d34dfea3da 100644 (file)
 #include "llvm/ADT/DenseMap.h"
 #include "llvm/ADT/SmallPtrSet.h"
 #include "llvm/ADT/Statistic.h"
+#include "llvm/Analysis/MemorySSA.h"
+#include "llvm/Analysis/MemorySSAUpdater.h"
 #include "llvm/Analysis/ValueTracking.h"
 #include "llvm/Transforms/Scalar.h"
 #include "llvm/Transforms/Utils/Local.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
-#include "llvm/Transforms/Utils/MemorySSAUpdater.h"
 
 using namespace llvm;
 
index 1e6692482bddb5ded6e971ea1eaea9ffc116a707..0b882a0a5c48d19fdb874802c091734c80542c61 100644 (file)
@@ -81,7 +81,7 @@
 #include "llvm/Transforms/Scalar/GVNExpression.h"
 #include "llvm/Transforms/Utils/BasicBlockUtils.h"
 #include "llvm/Transforms/Utils/Local.h"
-#include "llvm/Transforms/Utils/MemorySSA.h"
+#include "llvm/Analysis/MemorySSA.h"
 #include "llvm/Transforms/Utils/PredicateInfo.h"
 #include "llvm/Transforms/Utils/VNCoercion.h"
 #include <numeric>
index 5bc322edbed1287844b522b46c0f9a211908d482..7a21c03da221ab57d6c6234354379ea3f6e5bdb3 100644 (file)
@@ -34,8 +34,6 @@ add_llvm_library(LLVMTransformUtils
   LowerMemIntrinsics.cpp
   LowerSwitch.cpp
   Mem2Reg.cpp
-  MemorySSA.cpp
-  MemorySSAUpdater.cpp
   MetaRenamer.cpp
   ModuleUtils.cpp
   NameAnonGlobals.cpp
index dd47c5532c5e13cda1b9cb578bfc0036907e09d8..7106483c3bd2a4037c2e458a34d07fad88bedc57 100644 (file)
@@ -35,8 +35,6 @@ void llvm::initializeTransformUtils(PassRegistry &Registry) {
   initializeUnifyFunctionExitNodesPass(Registry);
   initializeInstSimplifierPass(Registry);
   initializeMetaRenamerPass(Registry);
-  initializeMemorySSAWrapperPassPass(Registry);
-  initializeMemorySSAPrinterLegacyPassPass(Registry);
   initializeStripGCRelocatesPass(Registry);
   initializePredicateInfoPrinterLegacyPassPass(Registry);
 }
index 625816ffb0887b0c3422386a3bc22ffd97a71a5d..40d5ea5f5ad783f0bc4cd6287cb88aeb29b1443c 100644 (file)
@@ -15,6 +15,7 @@ add_llvm_unittest(AnalysisTests
   LazyCallGraphTest.cpp
   LoopInfoTest.cpp
   MemoryBuiltinsTest.cpp
+  MemorySSA.cpp
   ProfileSummaryInfoTest.cpp
   ScalarEvolutionTest.cpp
   TBAATest.cpp
similarity index 99%
rename from unittests/Transforms/Utils/MemorySSA.cpp
rename to unittests/Analysis/MemorySSA.cpp
index 0f283f5e3305196e8843b52ac2c6705f7cd6b2aa..08b0e830a9b2e02e6e91d04145511d9db1f4415c 100644 (file)
@@ -6,16 +6,16 @@
 // License. See LICENSE.TXT for details.
 //
 //===----------------------------------------------------------------------===//
-#include "llvm/Transforms/Utils/MemorySSA.h"
 #include "llvm/Analysis/AliasAnalysis.h"
 #include "llvm/Analysis/BasicAliasAnalysis.h"
+#include "llvm/Analysis/MemorySSA.h"
+#include "llvm/Analysis/MemorySSAUpdater.h"
 #include "llvm/IR/BasicBlock.h"
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/Dominators.h"
 #include "llvm/IR/IRBuilder.h"
 #include "llvm/IR/Instructions.h"
 #include "llvm/IR/LLVMContext.h"
-#include "llvm/Transforms/Utils/MemorySSAUpdater.h"
 #include "gtest/gtest.h"
 
 using namespace llvm;
index c0f37418e492850a1ca36743d32548599afbc6ae..0fc19ef09fb01ffa5d97a1f443a12e2e9a3abc20 100644 (file)
@@ -11,6 +11,5 @@ add_llvm_unittest(UtilsTests
   FunctionComparator.cpp
   IntegerDivision.cpp
   Local.cpp
-  MemorySSA.cpp
   ValueMapperTest.cpp
   )