[ADCE] Use succ_empty (NFC)
authorKazu Hirata <kazu@google.com>
Mon, 16 Nov 2020 03:52:59 +0000 (19:52 -0800)
committerKazu Hirata <kazu@google.com>
Mon, 16 Nov 2020 03:52:59 +0000 (19:52 -0800)
llvm/lib/Transforms/Scalar/ADCE.cpp

index c3709b9..2b64973 100644 (file)
@@ -643,7 +643,7 @@ void AggressiveDeadCodeElimination::computeReversePostOrder() {
   SmallPtrSet<BasicBlock*, 16> Visited;
   unsigned PostOrder = 0;
   for (auto &BB : F) {
-    if (succ_begin(&BB) != succ_end(&BB))
+    if (!succ_empty(&BB))
       continue;
     for (BasicBlock *Block : inverse_post_order_ext(&BB,Visited))
       BlockInfo[Block].PostOrder = PostOrder++;