[PATCH] D86669: [ValueTracking] Remove MaxLookup from getUnderlyingObjects

Vitaly Buka via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Aug 26 18:41:22 PDT 2020


vitalybuka created this revision.
vitalybuka added reviewers: eugenis, efriedma.
Herald added subscribers: llvm-commits, hiraditya.
Herald added a project: LLVM.
vitalybuka requested review of this revision.

Support long chains of instruction where getUnderlyingObject fails.
getUnderlyingObjects already traverse large set on instructions so
there is no reason to limit some sequences by MaxLookup.

getUnderlyingObject needs MaxLookup to avoid infinit loops on cycles.

getUnderlyingObjects uses Visited so it can't get into infinit loops
if it calls getUnderlyingObject with MaxLookup > 0.

So we can continiosly repeate getUnderlyingObject updating Visited and
return all underlying Values.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D86669

Files:
  llvm/include/llvm/Analysis/ValueTracking.h
  llvm/lib/Analysis/ValueTracking.cpp
  llvm/unittests/Analysis/ValueTrackingTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D86669.288152.patch
Type: text/x-patch
Size: 3812 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200827/c19513c4/attachment.bin>


More information about the llvm-commits mailing list