[PATCH] [NaryReassociate] speeds up candidate searching

Jingyue Wu jingyue at google.com
Thu Apr 16 11:22:44 PDT 2015


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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D9055.23870.patch
Type: text/x-patch
Size: 3527 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150416/03ca9631/attachment.bin>


More information about the llvm-commits mailing list