mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-28 02:37:37 +00:00
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
This commit is contained in:
parent
03b2a8e47e
commit
554dcd8c89
@ -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
|
@ -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
|
@ -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>
|
||||
|
@ -79,6 +79,8 @@ void llvm::initializeAnalysis(PassRegistry &Registry) {
|
||||
initializeTypeBasedAAWrapperPassPass(Registry);
|
||||
initializeScopedNoAliasAAWrapperPassPass(Registry);
|
||||
initializeLCSSAVerificationPassPass(Registry);
|
||||
initializeMemorySSAWrapperPassPass(Registry);
|
||||
initializeMemorySSAPrinterLegacyPassPass(Registry);
|
||||
}
|
||||
|
||||
void LLVMInitializeAnalysis(LLVMPassRegistryRef R) {
|
||||
|
@ -53,6 +53,8 @@ add_llvm_library(LLVMAnalysis
|
||||
MemoryBuiltins.cpp
|
||||
MemoryDependenceAnalysis.cpp
|
||||
MemoryLocation.cpp
|
||||
MemorySSA.cpp
|
||||
MemorySSAUpdater.cpp
|
||||
ModuleDebugInfoPrinter.cpp
|
||||
ModuleSummaryAnalysis.cpp
|
||||
ObjCARCAliasAnalysis.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"
|
@ -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"
|
@ -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"
|
||||
|
@ -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;
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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>
|
||||
|
@ -34,8 +34,6 @@ add_llvm_library(LLVMTransformUtils
|
||||
LowerMemIntrinsics.cpp
|
||||
LowerSwitch.cpp
|
||||
Mem2Reg.cpp
|
||||
MemorySSA.cpp
|
||||
MemorySSAUpdater.cpp
|
||||
MetaRenamer.cpp
|
||||
ModuleUtils.cpp
|
||||
NameAnonGlobals.cpp
|
||||
|
@ -35,8 +35,6 @@ void llvm::initializeTransformUtils(PassRegistry &Registry) {
|
||||
initializeUnifyFunctionExitNodesPass(Registry);
|
||||
initializeInstSimplifierPass(Registry);
|
||||
initializeMetaRenamerPass(Registry);
|
||||
initializeMemorySSAWrapperPassPass(Registry);
|
||||
initializeMemorySSAPrinterLegacyPassPass(Registry);
|
||||
initializeStripGCRelocatesPass(Registry);
|
||||
initializePredicateInfoPrinterLegacyPassPass(Registry);
|
||||
}
|
||||
|
@ -15,6 +15,7 @@ add_llvm_unittest(AnalysisTests
|
||||
LazyCallGraphTest.cpp
|
||||
LoopInfoTest.cpp
|
||||
MemoryBuiltinsTest.cpp
|
||||
MemorySSA.cpp
|
||||
ProfileSummaryInfoTest.cpp
|
||||
ScalarEvolutionTest.cpp
|
||||
TBAATest.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;
|
@ -11,6 +11,5 @@ add_llvm_unittest(UtilsTests
|
||||
FunctionComparator.cpp
|
||||
IntegerDivision.cpp
|
||||
Local.cpp
|
||||
MemorySSA.cpp
|
||||
ValueMapperTest.cpp
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user