This is an archive of the discontinued LLVM Phabricator instance.

Template the sparse propagation solver instead of using void pointers
ClosedPublic

Authored by dberlin on Oct 2 2017, 1:26 PM.

Details

Summary

This avoids using void * as the type of the lattice value and ugly casts needed to make that happen.
(If folks want to use references, etc, they can use a reference_wrapper).

Diff Detail

Repository
rL LLVM

Event Timeline

dberlin created this revision.Oct 2 2017, 1:26 PM
davide accepted this revision.Oct 2 2017, 1:31 PM

Pretty cool :)

This revision is now accepted and ready to land.Oct 2 2017, 1:31 PM
mssimpso accepted this revision.Oct 2 2017, 1:45 PM

Thanks!

This revision was automatically updated to reflect the committed changes.

Hi Danny,

I didn't think about this previously, but now that AbstractLatticeFunction and SparseSolver are templates, shouldn't we move the contents of the .cpp over to the .h? I'm having trouble instantiating them now with this split implementation.

Ah, the joy of not having users to break.
Yes, i expect you will have to move a bunch if not all of these to the header.