[llvm] r300552 - [GVNHoist] Mark GlobalsAA as preserved by GVNHoist.
Nikolai Bozhenov via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 18 06:25:49 PDT 2017
Author: n.bozhenov
Date: Tue Apr 18 08:25:49 2017
New Revision: 300552
URL: http://llvm.org/viewvc/llvm-project?rev=300552&view=rev
Log:
[GVNHoist] Mark GlobalsAA as preserved by GVNHoist.
Reviewers: sebpop, hiraditya
Reviewed By: sebpop
Subscribers: n.bozhenov, llvm-commits
Differential Revision: https://reviews.llvm.org/D32158
Patch by Andrei Elovikov <andrei.elovikov at intel.com>
Modified:
llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
Modified: llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp?rev=300552&r1=300551&r2=300552&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp (original)
+++ llvm/trunk/lib/Transforms/Scalar/GVNHoist.cpp Tue Apr 18 08:25:49 2017
@@ -45,6 +45,7 @@
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/Statistic.h"
+#include "llvm/Analysis/GlobalsModRef.h"
#include "llvm/Analysis/MemorySSA.h"
#include "llvm/Analysis/MemorySSAUpdater.h"
#include "llvm/Analysis/ValueTracking.h"
@@ -1010,6 +1011,7 @@ public:
AU.addRequired<MemorySSAWrapperPass>();
AU.addPreserved<DominatorTreeWrapperPass>();
AU.addPreserved<MemorySSAWrapperPass>();
+ AU.addPreserved<GlobalsAAWrapperPass>();
}
};
} // namespace
@@ -1026,6 +1028,7 @@ PreservedAnalyses GVNHoistPass::run(Func
PreservedAnalyses PA;
PA.preserve<DominatorTreeAnalysis>();
PA.preserve<MemorySSAAnalysis>();
+ PA.preserve<GlobalsAA>();
return PA;
}
More information about the llvm-commits
mailing list