[PATCH] D31730: [LCSSA] Remove redundant check

Davide Italiano via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 5 15:17:53 PDT 2017


davide created this revision.

`formLCSSA` checks that the set of exit block is not empty, and then calls `formLCSSAForInstructions` which does the same check again.
AFAICT there's nothing changing the set of exit blocks in the meanwhile, making the second check redundant.


https://reviews.llvm.org/D31730

Files:
  lib/Transforms/Utils/LCSSA.cpp


Index: lib/Transforms/Utils/LCSSA.cpp
===================================================================
--- lib/Transforms/Utils/LCSSA.cpp
+++ lib/Transforms/Utils/LCSSA.cpp
@@ -92,9 +92,6 @@
     assert(LoopExitBlocks.count(L));
     const SmallVectorImpl<BasicBlock *> &ExitBlocks = LoopExitBlocks[L];
 
-    if (ExitBlocks.empty())
-      continue;
-
     // Tokens cannot be used in PHI nodes, so we skip over them.
     // We can run into tokens which are live out of a loop with catchswitch
     // instructions in Windows EH if the catchswitch has one catchpad which


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31730.94292.patch
Type: text/x-patch
Size: 576 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170405/1f8ac960/attachment.bin>


More information about the llvm-commits mailing list