[PATCH] [NaryReassociate] run NaryReassociate iteratively

Jingyue Wu jingyue at google.com
Thu Apr 16 13:49:32 PDT 2015


Hi atrick, broune, dberlin, meheff,

An alternative is to use a worklist approach. However, that approach
would break the traversing order so that we couldn't lookup SeenExprs
efficiently. I don't see a clear winner here, so I picked the easier approach.

Along with two minor improvements:
1. preserves ScalarEvolution by forgetting instructions replaced
2. removes dead code locally avoiding the need of running DCE afterwards

http://reviews.llvm.org/D9058

Files:
  lib/Transforms/Scalar/NaryReassociate.cpp
  test/Transforms/NaryReassociate/nary-add.ll

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9058.23878.patch
Type: text/x-patch
Size: 6473 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150416/af9fd3c3/attachment.bin>


More information about the llvm-commits mailing list