[PATCH] D105535: [NFC] Remove duplicate function calls

Max Kazantsev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 7 03:03:08 PDT 2021


This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG19885c7adf55: [NFC] Remove duplicate function calls (authored by mkazantsev).

Changed prior to commit:
  https://reviews.llvm.org/D105535?vs=356887&id=356910#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D105535/new/

https://reviews.llvm.org/D105535

Files:
  llvm/lib/Transforms/Scalar/LoopDeletion.cpp


Index: llvm/lib/Transforms/Scalar/LoopDeletion.cpp
===================================================================
--- llvm/lib/Transforms/Scalar/LoopDeletion.cpp
+++ llvm/lib/Transforms/Scalar/LoopDeletion.cpp
@@ -228,7 +228,7 @@
   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 @@
   //     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);


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D105535.356910.patch
Type: text/x-patch
Size: 902 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210707/cbb0266b/attachment.bin>


More information about the llvm-commits mailing list