summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/Function.cpp
diff options
context:
space:
mode:
authorJingyue Wu <jingyue@google.com>2015-04-16 18:42:31 +0000
committerJingyue Wu <jingyue@google.com>2015-04-16 18:42:31 +0000
commit771dfe91cf6294bd14361a15ea6bbcc7b32626a3 (patch)
tree4440917a579b2bb2d075d8b870231ecb013e9c31 /llvm/lib/IR/Function.cpp
parent7a60b6db76f5d2be3f42eb5d6b94aa758a7d78de (diff)
downloadbcm5719-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 'llvm/lib/IR/Function.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud