mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-04-08 09:43:20 +00:00
MergedLoadStoreMotion preserves MemoryDependenceAnalysis, it does not require it.
(It already was coded assuming it can sometimes be null, so no other changes are necessary) git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237978 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
ab0b15dff8
commit
4ea24c84fb
@ -117,8 +117,8 @@ private:
|
||||
// This transformation requires dominator postdominator info
|
||||
void getAnalysisUsage(AnalysisUsage &AU) const override {
|
||||
AU.addRequired<TargetLibraryInfoWrapperPass>();
|
||||
AU.addRequired<MemoryDependenceAnalysis>();
|
||||
AU.addRequired<AliasAnalysis>();
|
||||
AU.addPreserved<MemoryDependenceAnalysis>();
|
||||
AU.addPreserved<AliasAnalysis>();
|
||||
}
|
||||
|
||||
@ -580,7 +580,7 @@ bool MergedLoadStoreMotion::mergeStores(BasicBlock *T) {
|
||||
/// \brief Run the transformation for each function
|
||||
///
|
||||
bool MergedLoadStoreMotion::runOnFunction(Function &F) {
|
||||
MD = &getAnalysis<MemoryDependenceAnalysis>();
|
||||
MD = getAnalysisIfAvailable<MemoryDependenceAnalysis>();
|
||||
AA = &getAnalysis<AliasAnalysis>();
|
||||
|
||||
bool Changed = false;
|
||||
|
Loading…
x
Reference in New Issue
Block a user