[PATCH] D33088: [LiveVariables] Switch Kill/Defs sets to be `DenseSet`

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Thu May 11 08:56:45 PDT 2017


On Wed, May 10, 2017 at 8:34 PM, Daniel Berlin <dberlin at dberlin.org> wrote:
> Sparse bit vector is going to be slow unless you can turn it into mostly
> real set operations.
> But it should be able to be turned into mostly real set operations.
> It would be a lot of work though
> (staring at it, i mean it iterates a lot and does things one by one, like
> defs and kills. That will never be faster on sparsebitvector.
>
> If the set of defs/kills was a mask or something you could union/intersect
> at once, then it would be much faster).
>
> The GCC version of live regs, which has subregs, and does the same thing
> with sparse bit vectors, doesn't take any appreciable time on these
> testcases  :(
>

Yes it's a non trivial amount of work to rewrite it. If we agree I'd
commit this change anyway (as it doesn't seem to make things worse at
least), but I agree the pass is not in an ideal state. I see you
contributed the rewrite of live reg in GCC (or more in general
gcc/df-problems.c), did you use the same algorithm/formulation and
just more efficient data structures?

Thanks,

--
Davide


More information about the llvm-commits mailing list