When I have to do arithmetic, using APInt, with the component parts of a SCEV *X, I've been using X->getType()->getIntegerBitWidth() to tell me how many bits to allocate in my APInts. Now I've come across a case where the SCEV has a pointer type. How can I find the width of a pointer in bits? Thanks, Preston -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20121111/ab4723a2/attachment.html>
On Sun, Nov 11, 2012 at 1:46 PM, Preston Briggs <preston.briggs at gmail.com> wrote:> When I have to do arithmetic, using APInt, with the component parts of a > SCEV *X, I've been using X->getType()->getIntegerBitWidth() to tell me how > many bits to allocate in my APInts. > > Now I've come across a case where the SCEV has a pointer type. How can I > find the width of a pointer in bits?DataLayout::getTypeSizeInBits. -Eli