[NFC] Remove duplicate function calls
Removed repeated call of L->getHeader(). Now using previously stored return value. Patch by Dmitry Makogon! Differential Revision: https://reviews.llvm.org/D105535 Reviewed By: mkazantsev
This commit is contained in:
parent
8ae9ab43dd
commit
19885c7adf
|
@ -228,7 +228,7 @@ static bool canProveExitOnFirstIteration(Loop *L, DominatorTree &DT,
|
|||
SmallPtrSet<BasicBlock *, 4> LiveBlocks;
|
||||
// Edges that are reachable on the 1st iteration.
|
||||
DenseSet<BasicBlockEdge> LiveEdges;
|
||||
LiveBlocks.insert(L->getHeader());
|
||||
LiveBlocks.insert(Header);
|
||||
|
||||
SmallPtrSet<BasicBlock *, 4> Visited;
|
||||
auto MarkLiveEdge = [&](BasicBlock *From, BasicBlock *To) {
|
||||
|
@ -286,7 +286,7 @@ static bool canProveExitOnFirstIteration(Loop *L, DominatorTree &DT,
|
|||
// iteration, mark this successor live.
|
||||
// 3b. If we cannot prove it, conservatively assume that all successors are
|
||||
// live.
|
||||
auto &DL = L->getHeader()->getModule()->getDataLayout();
|
||||
auto &DL = Header->getModule()->getDataLayout();
|
||||
const SimplifyQuery SQ(DL);
|
||||
for (auto *BB : RPOT) {
|
||||
Visited.insert(BB);
|
||||
|
|
Loading…
Reference in New Issue