[PATCH] D55232: [SCEV] Suppress hoisting insertion point of binops when unsafe

Warren Ristow via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 7 19:47:40 PDT 2019


wristow updated this revision to Diff 198577.
wristow added a comment.
Herald added a project: LLVM.

Thanks for the review @sanjoy!

I've removed the default setting of the `IsSafeToHoist` argument, and I've used `opt -instnamer` to give the instructions names.

I also ran `update_test_checks.py`, but I felt compelled to edit the result down significantly (because there were so many instructions that were not related to the optimization, and I was worried it would make the resulting test too sensitive to unrelated changes in llvm).  After editing it down to what I felt were the relevant instructions, I then also wanted to add some checks to verify that a division did //not //appear in places where it shouldn't be hoisted to.  With that, I decided it was so different from the results of `update_test_checks.py` that I decided to remove the comment `Assertions have been autogenerated by utils/update_test_checks.py`.  Bottom line: There are more explicit checks than I had originally, but not anywhere near the full set that would appear from that script.  If you'd prefer that I leave the more substantial set of checks in place, let me know, and it will be easy for me to "un-do" much of the editing-down I did.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D55232/new/

https://reviews.llvm.org/D55232

Files:
  llvm/include/llvm/Analysis/ScalarEvolutionExpander.h
  llvm/lib/Analysis/ScalarEvolutionExpander.cpp
  llvm/test/Transforms/LoopVectorize/pr38697.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D55232.198577.patch
Type: text/x-patch
Size: 20285 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190508/36d8ce29/attachment.bin>


More information about the llvm-commits mailing list