This is an archive of the discontinued LLVM Phabricator instance.

[X86] Use APInt instead of SmallBitVector tracking undef elements from getTargetConstantBitsFromNode and getConstVector.
ClosedPublic

Authored by craig.topper on Feb 26 2017, 9:57 PM.

Details

Summary

SmallBitVector uses a malloc for more than 58 bits on a 64-bit target and more than 27 bits on a 32-bit target. Some of the vector types we deal with here use more than those number of elements and therefore cause a malloc.

APInt on the other hand supports up to 64 bits without a malloc. That's the maximum number of bits we need here so we can avoid a malloc for all cases by using APInt.

Diff Detail

Repository
rL LLVM

Event Timeline

craig.topper created this revision.Feb 26 2017, 9:57 PM
RKSimon accepted this revision.Feb 27 2017, 7:07 AM

LGTM

This revision is now accepted and ready to land.Feb 27 2017, 7:07 AM
This revision was automatically updated to reflect the committed changes.