[PATCH] D72602: [IndVarSimplify][LoopUtils] rewriteLoopExitValues. NFC.

Sjoerd Meijer via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 13 05:20:25 PST 2020


SjoerdMeijer created this revision.
SjoerdMeijer added reviewers: reames, Meinersbur, nikic, samparker, dmgreen.
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.

This moves `rewriteLoopExitValues` from IndVarSimplify to LoopUtils thus making it a generic loop utility function, which should be a non-functional change. This allows to rewrite loop exit values by just calling this function without running the whole IndVarSimplify pass.

For context, we would like to (re)use rewriteLoopExitValues to rematerialize the iteration count in loop exit blocks, which allows us to optimise away better induction variable expressions in hardware-loops.


https://reviews.llvm.org/D72602

Files:
  llvm/include/llvm/Transforms/Utils/LoopUtils.h
  llvm/lib/Transforms/Scalar/IndVarSimplify.cpp
  llvm/lib/Transforms/Utils/LoopUtils.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72602.237633.patch
Type: text/x-patch
Size: 27841 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200113/5488e227/attachment.bin>


More information about the llvm-commits mailing list