[PATCH] D32495: [APInt] Use isSubsetOf, intersects, and bit counting methods to reduce temporary APInts

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Apr 25 10:11:01 PDT 2017


craig.topper created this revision.
Herald added a subscriber: mzolotukhin.

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

This should be all of the unrelated cleanups that got buried in https://reviews.llvm.org/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.


https://reviews.llvm.org/D32495

Files:
  lib/Analysis/InstructionSimplify.cpp
  lib/Analysis/ValueTracking.cpp
  lib/Transforms/InstCombine/InstCombineCalls.cpp
  lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
  lib/Transforms/Utils/SimplifyCFG.cpp
  lib/Transforms/Vectorize/LoadStoreVectorizer.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D32495.96588.patch
Type: text/x-patch
Size: 5194 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170425/60d1d45f/attachment.bin>


More information about the llvm-commits mailing list