[PATCH] D68844: [SCEV] Compute exit count for simple floating point IVs

Philip Reames via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 10 17:40:29 PDT 2019


reames created this revision.
reames added reviewers: nikic, sanjoy, scanon.
Herald added subscribers: bollu, mcrosier.
Herald added a project: LLVM.

This patch adds the plumbing for computing exit counts for loops with floating point IVs.  The logic is generally pretty simple (deliberately).  The basic reasoning is that if we have an IV with integer values represented as floats, then we can compute the exit counts "as-if" they were ints.

The motivation here is to eventually subsume the logic inside IndVarSimplify::handleFloatingPointIV, and restructure that one to simply perform the transform.  By doing so, we handle a much broader class of floating point IV loops than we do today.

To be fair, the actual motivation behind all of this is to break a toy microbenchmark.  This is not something seen in real code.


Repository:
  rL LLVM

https://reviews.llvm.org/D68844

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D68844.224508.patch
Type: text/x-patch
Size: 13317 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191011/1e8bef8e/attachment.bin>


More information about the llvm-commits mailing list