[PATCH] D28756: Rewrite part of how loop ID is obtained.

Xin Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Jan 15 17:36:53 PST 2017


trentxintong created this revision.
trentxintong added reviewers: sanjoy, hfinkel, anemet, mzolotukhin, mkuper.
trentxintong added a subscriber: llvm-commits.

If a loop has multiple backedges and all of them have the same metadata.
we return that metadata. Otherwise we return nullptr.

Without the patch, we search through all blocks in the loop, this is an
overkill and more important we bail on the first block that does not have a
metadata. This block can even a non-latch block!.


https://reviews.llvm.org/D28756

Files:
  lib/Analysis/LoopInfo.cpp
  unittests/Analysis/LoopInfoTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D28756.84513.patch
Type: text/x-patch
Size: 4857 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170116/0f1577b7/attachment.bin>


More information about the llvm-commits mailing list