[PATCH] D38766: [CVP] Process binary operations even when def is local

Anna Thomas via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 10 14:56:12 PDT 2017


anna created this revision.

This patch adds processing of binary operations when the def of operands are in
the same block (i.e. local processing).

Earlier we bailed out in such cases (the bail out was introduced in https://reviews.llvm.org/rL252032)
because LVI at that time was more precise about context at the end of basic
blocks, which implied local def and use analysis didn't benefit CVP.

Since then we've added support for LVI in presence of assumes and guards. The
test cases added show how local def processing in CVP helps adding more
information to the ashr, sdiv, srem and add operators.

Note: processCmp which suffers from the same problem will
be handled in a later patch.


https://reviews.llvm.org/D38766

Files:
  lib/Transforms/Scalar/CorrelatedValuePropagation.cpp
  test/Transforms/CorrelatedValuePropagation/add.ll
  test/Transforms/CorrelatedValuePropagation/ashr.ll
  test/Transforms/CorrelatedValuePropagation/sdiv.ll
  test/Transforms/CorrelatedValuePropagation/srem.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D38766.118490.patch
Type: text/x-patch
Size: 6694 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20171010/db68d560/attachment.bin>


More information about the llvm-commits mailing list