This is an archive of the discontinued LLVM Phabricator instance.

[APInt] Use isSubsetOf, intersects, and bit counting methods to reduce temporary APInts
ClosedPublic

Authored by craig.topper on Apr 25 2017, 10:11 AM.

Details

Summary

This patch uses various APInt methods to reduce temporary APInt creation.

This should be all of the unrelated cleanups that got buried in D32376(creating a KnownBits struct) as well as some pointed out by Simon during the review of that. Plus a few improvements to use counting instead of masking.

I've left out any places where we do something like (KnownZero & KnownOne) != 0 as I plan to add a helper method to KnownBits to ask that question and didn't want to thrash that code an additional time.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Apr 25 2017, 10:11 AM
RKSimon accepted this revision.Apr 25 2017, 10:46 AM

LGTM - thanks Craig

This revision is now accepted and ready to land.Apr 25 2017, 10:46 AM
This revision was automatically updated to reflect the committed changes.