[PATCH] D82895: [NFC][LoopInfo] Document empty()

Stefanos Baziotis via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 3 03:44:57 PDT 2020


baziotis added a comment.

I partially agree but also IMHO `empty()` is confusing enough so that introducing `isInnermost/Outermost` has benefit that outweighs the cost. A `Loop` can contain both BBs and loops which is different than `DominatorTree` AFAIK (which can only contain BBs).
This is a big source of confusion when one comes across it in the code (and as I said, personally I assumed it had to do with the BBs).

Of course though, I don't have any kind of strong opinion. We can wait for other people's opinions.


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

https://reviews.llvm.org/D82895





More information about the llvm-commits mailing list