summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kazantsev <max.kazantsev@azul.com>2019-02-15 11:39:35 +0000
committerMax Kazantsev <max.kazantsev@azul.com>2019-02-15 11:39:35 +0000
commit136f09bea19b2584a7b8b4739ca4935dde319753 (patch)
tree623ecf665433b061a6542b8d70f956294c007081
parent6ce08672fb4d3945db7a410704292392cf4042b2 (diff)
downloadbcm5719-llvm-136f09bea19b2584a7b8b4739ca4935dde319753.tar.gz
bcm5719-llvm-136f09bea19b2584a7b8b4739ca4935dde319753.zip
[NFC] Promote DFS to field for further use
llvm-svn: 354118
-rw-r--r--llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp b/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
index 746ca9ec31b..40b3306c2c5 100644
--- a/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopSimplifyCFG.cpp
@@ -90,6 +90,7 @@ private:
ScalarEvolution &SE;
MemorySSAUpdater *MSSAU;
DomTreeUpdater DTU;
+ LoopBlocksDFS DFS;
SmallVector<DominatorTree::UpdateType, 16> DTUpdates;
// Whether or not the current loop has irreducible CFG.
@@ -176,7 +177,6 @@ private:
/// Fill all information about status of blocks and exits of the current loop
/// if constant folding of all branches will be done.
void analyze() {
- LoopBlocksDFS DFS(&L);
DFS.perform(&LI);
assert(DFS.isComplete() && "DFS is expected to be finished");
@@ -498,7 +498,7 @@ public:
ConstantTerminatorFoldingImpl(Loop &L, LoopInfo &LI, DominatorTree &DT,
ScalarEvolution &SE,
MemorySSAUpdater *MSSAU)
- : L(L), LI(LI), DT(DT), SE(SE), MSSAU(MSSAU),
+ : L(L), LI(LI), DT(DT), SE(SE), MSSAU(MSSAU), DFS(&L),
DTU(DT, DomTreeUpdater::UpdateStrategy::Eager) {}
bool run() {
assert(L.getLoopLatch() && "Should be single latch!");
OpenPOWER on IntegriCloud