[PATCH] [NaryReassociate] speeds up candidate searching

Daniel Berlin dberlin at dberlin.org
Thu Apr 16 12:06:05 PDT 2015


Great job. LGTM


On Thu, Apr 16, 2015 at 11:22 AM, Jingyue Wu <jingyue at google.com> wrote:
> Hi atrick, broune, dberlin, meheff,
>
> This fixes a left-over efficiency issue in D8950.
>
> As Andrew and Daniel suggested, we can store the candidates in a stack
> and pop the top element when it does not dominate the current
> instruction. This reduces the worst-case time complexity to O(n).
>
> http://reviews.llvm.org/D9055
>
> Files:
>   lib/Transforms/Scalar/NaryReassociate.cpp
>   test/Transforms/NaryReassociate/nary-add.ll
>
> EMAIL PREFERENCES
>   http://reviews.llvm.org/settings/panel/emailpreferences/



More information about the llvm-commits mailing list