This is an archive of the discontinued LLVM Phabricator instance.

[UnJ] Use SmallPtrSets for block collections NFC
ClosedPublic

Authored by dmgreen on Jul 8 2018, 1:40 PM.

Details

Summary

We no longer care about the order of blocks in these collections,
so can change to SmallPtrSets, making contains checks quicker.

Diff Detail

Repository
rL LLVM

Event Timeline

dmgreen created this revision.Jul 8 2018, 1:40 PM
SjoerdMeijer accepted this revision.Jul 9 2018, 12:40 AM

For readability, you could consider creating a type alias for "SmallPtrSet<BasicBlock *, 4>", but that's just a nit and this looks like some straightforward refactoring to me.

This revision is now accepted and ready to land.Jul 9 2018, 12:40 AM
This revision was automatically updated to reflect the committed changes.