[PATCH] D73398: In SCEV's printer pass, print an estimate of the exit count for each exit from profiling information

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 24 18:06:54 PST 2020


reames created this revision.
reames added reviewers: fedor.sergeev, nikic.
Herald added subscribers: javed.absar, bollu, hiraditya, mcrosier.
Herald added a project: LLVM.

This is geared at being a debugging aid.  When analysing IR, it's common to have large complicated loops with multiple exits and profiling data which indicates which exit is actually taken.  When looking to see if there's a problem in SCEV's exit count logic, it really helps to be able to quickly see which exits are probably dead in practice.  These are frequently - though not always - good places to examine further.

For the moment, the implementation of the estimated exit count stuff is SCEV specific.  There's a version of something analogous in getEstimatedTripCount but a) trip count != exit count, and b) this needs to handle multiple exit loops, and c) I want to be able switch consumes over one by one to minimize breakage.  My plan is to land this, move the impl into a common analysis header, then visit each one by one.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D73398

Files:
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/test/Analysis/ScalarEvolution/trip-count.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D73398.240343.patch
Type: text/x-patch
Size: 7322 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200125/33ca02a9/attachment.bin>


More information about the llvm-commits mailing list