Eliminate O(n^2) worst-case behavior in SSA construction
authorCameron Zwarich <zwarich@apple.com>
Wed, 8 Apr 2015 18:26:20 +0000 (18:26 +0000)
committerCameron Zwarich <zwarich@apple.com>
Wed, 8 Apr 2015 18:26:20 +0000 (18:26 +0000)
commit011438b1c7da44500472ed7555e047f40d230b0a
tree8967f49faccf1d5f3d23d5d40523b2f68d30287f
parentcd13a3808a2286449b7cbb0bdfac9f6825a6f271
Eliminate O(n^2) worst-case behavior in SSA construction

The code uses a priority queue and a worklist, which share the same
visited set, but the visited set is only updated when inserting into
the priority queue. Instead, switch to using separate visited sets
for the priority queue and worklist.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@234425 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/PromoteMemoryToRegister.cpp