diff options
| author | Jingyue Wu <jingyue@google.com> | 2015-04-16 18:42:31 +0000 |
|---|---|---|
| committer | Jingyue Wu <jingyue@google.com> | 2015-04-16 18:42:31 +0000 |
| commit | 771dfe91cf6294bd14361a15ea6bbcc7b32626a3 (patch) | |
| tree | 4440917a579b2bb2d075d8b870231ecb013e9c31 /libcxx/test/std/utilities | |
| parent | 7a60b6db76f5d2be3f42eb5d6b94aa758a7d78de (diff) | |
| download | bcm5719-llvm-771dfe91cf6294bd14361a15ea6bbcc7b32626a3.tar.gz bcm5719-llvm-771dfe91cf6294bd14361a15ea6bbcc7b32626a3.zip | |
[NaryReassociate] speeds up candidate searching
Summary:
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).
Test Plan: a new test in nary-add.ll that exercises this optimization.
Reviewers: broune, dberlin, meheff, atrick
Reviewed By: atrick
Subscribers: llvm-commits, sanjoy
Differential Revision: http://reviews.llvm.org/D9055
llvm-svn: 235129
Diffstat (limited to 'libcxx/test/std/utilities')
0 files changed, 0 insertions, 0 deletions

