Reapply "[DemandedBits] Use SetVector for Worklist"
authorNikita Popov <nikita.ppv@gmail.com>
Sat, 12 Jan 2019 09:09:15 +0000 (09:09 +0000)
committerNikita Popov <nikita.ppv@gmail.com>
Sat, 12 Jan 2019 09:09:15 +0000 (09:09 +0000)
commit5f393eb5da7f749e651ae9181515fa16554ebcbe
treed3b7e85eb6f8188d2f712040d822d63c618b53c2
parent6a4d2d6561f5cb199a61f9952e01825e4b391c9b
Reapply "[DemandedBits] Use SetVector for Worklist"

DemandedBits currently uses a simple vector for the worklist, which
means that instructions may be inserted multiple times into it.
Especially in combination with the deep lattice, this may cause
instructions too be recomputed very often. To avoid this, switch
to a SetVector.

Reapplying with a smaller number of inline elements in the
SmallSetVector, to avoid running into the SmallDenseMap issue
described in D56455.

Differential Revision: https://reviews.llvm.org/D56362

llvm-svn: 350997
llvm/lib/Analysis/DemandedBits.cpp