[PATCH] D52575: [SimplifyCFG] Pass AggressiveInsts to DominatesMergePoint by reference. Remove null check.

Dávid Bolvanský via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 4 16:11:19 PDT 2018


xbolva00 added inline comments.


================
Comment at: lib/Transforms/Utils/SimplifyCFG.cpp:353
   // If we have seen this instruction before, don't count it again.
-  if (AggressiveInsts->count(I))
+  if (AggressiveInsts.count(I))
     return true;
----------------
craig.topper wrote:
> xbolva00 wrote:
> > AggressiveInsts.find(I) != AggressiveInsts.end()
> Why?
Count() counts them all, useless iterations after first occurance..

This condition just checks if there is any occurence of I in the AgressiveInst, so “find” is better choice I think


https://reviews.llvm.org/D52575





More information about the llvm-commits mailing list