From e485ce96aac590ade82b84a4aabdb8e00e922d2b Mon Sep 17 00:00:00 2001 From: Daniel Berlin Date: Tue, 11 Apr 2017 20:06:36 +0000 Subject: [PATCH] MemorySSA: Move to Analysis, from Transforms/Utils. It's used as Analysis, it has Analysis passes, and once NewGVN is made an Analysis, this removes the cross dependency from Analysis to Transform/Utils. NFC. llvm-svn: 299980 --- include/llvm/{Transforms/Utils => Analysis}/MemorySSA.h | 6 +++--- .../{Transforms/Utils => Analysis}/MemorySSAUpdater.h | 8 ++++---- include/llvm/Transforms/Scalar/GVNExpression.h | 2 +- lib/Analysis/Analysis.cpp | 2 ++ lib/Analysis/CMakeLists.txt | 2 ++ lib/{Transforms/Utils => Analysis}/MemorySSA.cpp | 2 +- lib/{Transforms/Utils => Analysis}/MemorySSAUpdater.cpp | 4 ++-- lib/Passes/PassBuilder.cpp | 2 +- lib/Transforms/Scalar/EarlyCSE.cpp | 4 ++-- lib/Transforms/Scalar/GVNHoist.cpp | 4 ++-- lib/Transforms/Scalar/NewGVN.cpp | 2 +- lib/Transforms/Utils/CMakeLists.txt | 2 -- lib/Transforms/Utils/Utils.cpp | 2 -- test/{Transforms/Util => Analysis}/MemorySSA/assume.ll | 0 .../Util => Analysis}/MemorySSA/atomic-clobber.ll | 0 .../Util => Analysis}/MemorySSA/basicaa-memcpy.ll | 0 .../Util => Analysis}/MemorySSA/constant-memory.ll | 0 test/{Transforms/Util => Analysis}/MemorySSA/cyclicphi.ll | 0 .../Util => Analysis}/MemorySSA/forward-unreachable.ll | 0 .../Util => Analysis}/MemorySSA/function-clobber.ll | 0 .../Util => Analysis}/MemorySSA/function-mem-attrs.ll | 0 .../Util => Analysis}/MemorySSA/invariant-groups.ll | 0 .../Util => Analysis}/MemorySSA/lifetime-simple.ll | 0 .../Util => Analysis}/MemorySSA/load-invariant.ll | 0 .../Util => Analysis}/MemorySSA/many-dom-backedge.ll | 0 test/{Transforms/Util => Analysis}/MemorySSA/many-doms.ll | 0 .../Util => Analysis}/MemorySSA/multi-edges.ll | 0 .../Util => Analysis}/MemorySSA/multiple-backedges-hal.ll | 0 .../Util => Analysis}/MemorySSA/multiple-locations.ll | 0 .../Util => Analysis}/MemorySSA/no-disconnected.ll | 0 .../Util => Analysis}/MemorySSA/optimize-use.ll | 0 .../Util => Analysis}/MemorySSA/phi-translation.ll | 0 test/{Transforms/Util => Analysis}/MemorySSA/pr28880.ll | 0 .../Util => Analysis}/MemorySSA/ptr-const-mem.ll | 0 .../Util => Analysis}/MemorySSA/volatile-clobber.ll | 0 unittests/Analysis/CMakeLists.txt | 1 + unittests/{Transforms/Utils => Analysis}/MemorySSA.cpp | 4 ++-- unittests/Transforms/Utils/CMakeLists.txt | 1 - 38 files changed, 24 insertions(+), 24 deletions(-) rename include/llvm/{Transforms/Utils => Analysis}/MemorySSA.h (99%) rename include/llvm/{Transforms/Utils => Analysis}/MemorySSAUpdater.h (97%) rename lib/{Transforms/Utils => Analysis}/MemorySSA.cpp (99%) rename lib/{Transforms/Utils => Analysis}/MemorySSAUpdater.cpp (99%) rename test/{Transforms/Util => Analysis}/MemorySSA/assume.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/atomic-clobber.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/basicaa-memcpy.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/constant-memory.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/cyclicphi.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/forward-unreachable.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/function-clobber.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/function-mem-attrs.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/invariant-groups.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/lifetime-simple.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/load-invariant.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/many-dom-backedge.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/many-doms.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/multi-edges.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/multiple-backedges-hal.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/multiple-locations.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/no-disconnected.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/optimize-use.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/phi-translation.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/pr28880.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/ptr-const-mem.ll (100%) rename test/{Transforms/Util => Analysis}/MemorySSA/volatile-clobber.ll (100%) rename unittests/{Transforms/Utils => Analysis}/MemorySSA.cpp (99%) diff --git a/include/llvm/Transforms/Utils/MemorySSA.h b/include/llvm/Analysis/MemorySSA.h similarity index 99% rename from include/llvm/Transforms/Utils/MemorySSA.h rename to include/llvm/Analysis/MemorySSA.h index b16826b1ccb..db31ae9f4f1 100644 --- a/include/llvm/Transforms/Utils/MemorySSA.h +++ b/include/llvm/Analysis/MemorySSA.h @@ -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> optimized_def_chain(T MA) { } // end namespace llvm -#endif // LLVM_TRANSFORMS_UTILS_MEMORYSSA_H +#endif // LLVM_ANALYSIS_MEMORYSSA_H diff --git a/include/llvm/Transforms/Utils/MemorySSAUpdater.h b/include/llvm/Analysis/MemorySSAUpdater.h similarity index 97% rename from include/llvm/Transforms/Utils/MemorySSAUpdater.h rename to include/llvm/Analysis/MemorySSAUpdater.h index 91e6fbe50b8..d30eeeaa95b 100644 --- a/include/llvm/Transforms/Utils/MemorySSAUpdater.h +++ b/include/llvm/Analysis/MemorySSAUpdater.h @@ -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 diff --git a/include/llvm/Transforms/Scalar/GVNExpression.h b/include/llvm/Transforms/Scalar/GVNExpression.h index 7b5e2faebea..2670a0c1a53 100644 --- a/include/llvm/Transforms/Scalar/GVNExpression.h +++ b/include/llvm/Transforms/Scalar/GVNExpression.h @@ -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 #include #include diff --git a/lib/Analysis/Analysis.cpp b/lib/Analysis/Analysis.cpp index d9af9bb560a..0e0b5c92a91 100644 --- a/lib/Analysis/Analysis.cpp +++ b/lib/Analysis/Analysis.cpp @@ -79,6 +79,8 @@ void llvm::initializeAnalysis(PassRegistry &Registry) { initializeTypeBasedAAWrapperPassPass(Registry); initializeScopedNoAliasAAWrapperPassPass(Registry); initializeLCSSAVerificationPassPass(Registry); + initializeMemorySSAWrapperPassPass(Registry); + initializeMemorySSAPrinterLegacyPassPass(Registry); } void LLVMInitializeAnalysis(LLVMPassRegistryRef R) { diff --git a/lib/Analysis/CMakeLists.txt b/lib/Analysis/CMakeLists.txt index d53364373d7..161709a4846 100644 --- a/lib/Analysis/CMakeLists.txt +++ b/lib/Analysis/CMakeLists.txt @@ -53,6 +53,8 @@ add_llvm_library(LLVMAnalysis MemoryBuiltins.cpp MemoryDependenceAnalysis.cpp MemoryLocation.cpp + MemorySSA.cpp + MemorySSAUpdater.cpp ModuleDebugInfoPrinter.cpp ModuleSummaryAnalysis.cpp ObjCARCAliasAnalysis.cpp diff --git a/lib/Transforms/Utils/MemorySSA.cpp b/lib/Analysis/MemorySSA.cpp similarity index 99% rename from lib/Transforms/Utils/MemorySSA.cpp rename to lib/Analysis/MemorySSA.cpp index b1e9603f533..910170561ab 100644 --- a/lib/Transforms/Utils/MemorySSA.cpp +++ b/lib/Analysis/MemorySSA.cpp @@ -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" diff --git a/lib/Transforms/Utils/MemorySSAUpdater.cpp b/lib/Analysis/MemorySSAUpdater.cpp similarity index 99% rename from lib/Transforms/Utils/MemorySSAUpdater.cpp rename to lib/Analysis/MemorySSAUpdater.cpp index c396bd73504..c63677fe550 100644 --- a/lib/Transforms/Utils/MemorySSAUpdater.cpp +++ b/lib/Analysis/MemorySSAUpdater.cpp @@ -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 #define DEBUG_TYPE "memoryssa" diff --git a/lib/Passes/PassBuilder.cpp b/lib/Passes/PassBuilder.cpp index ac77b1d511b..0421946a32a 100644 --- a/lib/Passes/PassBuilder.cpp +++ b/lib/Passes/PassBuilder.cpp @@ -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" @@ -135,7 +136,6 @@ #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" diff --git a/lib/Transforms/Scalar/EarlyCSE.cpp b/lib/Transforms/Scalar/EarlyCSE.cpp index 50141e4def9..04479b6e49a 100644 --- a/lib/Transforms/Scalar/EarlyCSE.cpp +++ b/lib/Transforms/Scalar/EarlyCSE.cpp @@ -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 using namespace llvm; using namespace llvm::PatternMatch; diff --git a/lib/Transforms/Scalar/GVNHoist.cpp b/lib/Transforms/Scalar/GVNHoist.cpp index 2797869851d..6adfe130d14 100644 --- a/lib/Transforms/Scalar/GVNHoist.cpp +++ b/lib/Transforms/Scalar/GVNHoist.cpp @@ -45,11 +45,11 @@ #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; diff --git a/lib/Transforms/Scalar/NewGVN.cpp b/lib/Transforms/Scalar/NewGVN.cpp index 1e6692482bd..0b882a0a5c4 100644 --- a/lib/Transforms/Scalar/NewGVN.cpp +++ b/lib/Transforms/Scalar/NewGVN.cpp @@ -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 diff --git a/lib/Transforms/Utils/CMakeLists.txt b/lib/Transforms/Utils/CMakeLists.txt index 5bc322edbed..7a21c03da22 100644 --- a/lib/Transforms/Utils/CMakeLists.txt +++ b/lib/Transforms/Utils/CMakeLists.txt @@ -34,8 +34,6 @@ add_llvm_library(LLVMTransformUtils LowerMemIntrinsics.cpp LowerSwitch.cpp Mem2Reg.cpp - MemorySSA.cpp - MemorySSAUpdater.cpp MetaRenamer.cpp ModuleUtils.cpp NameAnonGlobals.cpp diff --git a/lib/Transforms/Utils/Utils.cpp b/lib/Transforms/Utils/Utils.cpp index dd47c5532c5..7106483c3bd 100644 --- a/lib/Transforms/Utils/Utils.cpp +++ b/lib/Transforms/Utils/Utils.cpp @@ -35,8 +35,6 @@ void llvm::initializeTransformUtils(PassRegistry &Registry) { initializeUnifyFunctionExitNodesPass(Registry); initializeInstSimplifierPass(Registry); initializeMetaRenamerPass(Registry); - initializeMemorySSAWrapperPassPass(Registry); - initializeMemorySSAPrinterLegacyPassPass(Registry); initializeStripGCRelocatesPass(Registry); initializePredicateInfoPrinterLegacyPassPass(Registry); } diff --git a/test/Transforms/Util/MemorySSA/assume.ll b/test/Analysis/MemorySSA/assume.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/assume.ll rename to test/Analysis/MemorySSA/assume.ll diff --git a/test/Transforms/Util/MemorySSA/atomic-clobber.ll b/test/Analysis/MemorySSA/atomic-clobber.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/atomic-clobber.ll rename to test/Analysis/MemorySSA/atomic-clobber.ll diff --git a/test/Transforms/Util/MemorySSA/basicaa-memcpy.ll b/test/Analysis/MemorySSA/basicaa-memcpy.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/basicaa-memcpy.ll rename to test/Analysis/MemorySSA/basicaa-memcpy.ll diff --git a/test/Transforms/Util/MemorySSA/constant-memory.ll b/test/Analysis/MemorySSA/constant-memory.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/constant-memory.ll rename to test/Analysis/MemorySSA/constant-memory.ll diff --git a/test/Transforms/Util/MemorySSA/cyclicphi.ll b/test/Analysis/MemorySSA/cyclicphi.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/cyclicphi.ll rename to test/Analysis/MemorySSA/cyclicphi.ll diff --git a/test/Transforms/Util/MemorySSA/forward-unreachable.ll b/test/Analysis/MemorySSA/forward-unreachable.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/forward-unreachable.ll rename to test/Analysis/MemorySSA/forward-unreachable.ll diff --git a/test/Transforms/Util/MemorySSA/function-clobber.ll b/test/Analysis/MemorySSA/function-clobber.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/function-clobber.ll rename to test/Analysis/MemorySSA/function-clobber.ll diff --git a/test/Transforms/Util/MemorySSA/function-mem-attrs.ll b/test/Analysis/MemorySSA/function-mem-attrs.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/function-mem-attrs.ll rename to test/Analysis/MemorySSA/function-mem-attrs.ll diff --git a/test/Transforms/Util/MemorySSA/invariant-groups.ll b/test/Analysis/MemorySSA/invariant-groups.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/invariant-groups.ll rename to test/Analysis/MemorySSA/invariant-groups.ll diff --git a/test/Transforms/Util/MemorySSA/lifetime-simple.ll b/test/Analysis/MemorySSA/lifetime-simple.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/lifetime-simple.ll rename to test/Analysis/MemorySSA/lifetime-simple.ll diff --git a/test/Transforms/Util/MemorySSA/load-invariant.ll b/test/Analysis/MemorySSA/load-invariant.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/load-invariant.ll rename to test/Analysis/MemorySSA/load-invariant.ll diff --git a/test/Transforms/Util/MemorySSA/many-dom-backedge.ll b/test/Analysis/MemorySSA/many-dom-backedge.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/many-dom-backedge.ll rename to test/Analysis/MemorySSA/many-dom-backedge.ll diff --git a/test/Transforms/Util/MemorySSA/many-doms.ll b/test/Analysis/MemorySSA/many-doms.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/many-doms.ll rename to test/Analysis/MemorySSA/many-doms.ll diff --git a/test/Transforms/Util/MemorySSA/multi-edges.ll b/test/Analysis/MemorySSA/multi-edges.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/multi-edges.ll rename to test/Analysis/MemorySSA/multi-edges.ll diff --git a/test/Transforms/Util/MemorySSA/multiple-backedges-hal.ll b/test/Analysis/MemorySSA/multiple-backedges-hal.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/multiple-backedges-hal.ll rename to test/Analysis/MemorySSA/multiple-backedges-hal.ll diff --git a/test/Transforms/Util/MemorySSA/multiple-locations.ll b/test/Analysis/MemorySSA/multiple-locations.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/multiple-locations.ll rename to test/Analysis/MemorySSA/multiple-locations.ll diff --git a/test/Transforms/Util/MemorySSA/no-disconnected.ll b/test/Analysis/MemorySSA/no-disconnected.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/no-disconnected.ll rename to test/Analysis/MemorySSA/no-disconnected.ll diff --git a/test/Transforms/Util/MemorySSA/optimize-use.ll b/test/Analysis/MemorySSA/optimize-use.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/optimize-use.ll rename to test/Analysis/MemorySSA/optimize-use.ll diff --git a/test/Transforms/Util/MemorySSA/phi-translation.ll b/test/Analysis/MemorySSA/phi-translation.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/phi-translation.ll rename to test/Analysis/MemorySSA/phi-translation.ll diff --git a/test/Transforms/Util/MemorySSA/pr28880.ll b/test/Analysis/MemorySSA/pr28880.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/pr28880.ll rename to test/Analysis/MemorySSA/pr28880.ll diff --git a/test/Transforms/Util/MemorySSA/ptr-const-mem.ll b/test/Analysis/MemorySSA/ptr-const-mem.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/ptr-const-mem.ll rename to test/Analysis/MemorySSA/ptr-const-mem.ll diff --git a/test/Transforms/Util/MemorySSA/volatile-clobber.ll b/test/Analysis/MemorySSA/volatile-clobber.ll similarity index 100% rename from test/Transforms/Util/MemorySSA/volatile-clobber.ll rename to test/Analysis/MemorySSA/volatile-clobber.ll diff --git a/unittests/Analysis/CMakeLists.txt b/unittests/Analysis/CMakeLists.txt index 625816ffb08..40d5ea5f5ad 100644 --- a/unittests/Analysis/CMakeLists.txt +++ b/unittests/Analysis/CMakeLists.txt @@ -15,6 +15,7 @@ add_llvm_unittest(AnalysisTests LazyCallGraphTest.cpp LoopInfoTest.cpp MemoryBuiltinsTest.cpp + MemorySSA.cpp ProfileSummaryInfoTest.cpp ScalarEvolutionTest.cpp TBAATest.cpp diff --git a/unittests/Transforms/Utils/MemorySSA.cpp b/unittests/Analysis/MemorySSA.cpp similarity index 99% rename from unittests/Transforms/Utils/MemorySSA.cpp rename to unittests/Analysis/MemorySSA.cpp index 0f283f5e330..08b0e830a9b 100644 --- a/unittests/Transforms/Utils/MemorySSA.cpp +++ b/unittests/Analysis/MemorySSA.cpp @@ -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; diff --git a/unittests/Transforms/Utils/CMakeLists.txt b/unittests/Transforms/Utils/CMakeLists.txt index c0f37418e49..0fc19ef09fb 100644 --- a/unittests/Transforms/Utils/CMakeLists.txt +++ b/unittests/Transforms/Utils/CMakeLists.txt @@ -11,6 +11,5 @@ add_llvm_unittest(UtilsTests FunctionComparator.cpp IntegerDivision.cpp Local.cpp - MemorySSA.cpp ValueMapperTest.cpp )