search for: numlowbitsavail

Displaying 10 results from an estimated 10 matches for "numlowbitsavail".

2009 Oct 08
2
[LLVMdev] question on code in PointerIntPair.h
around line 45 a bitmask is computed as: PointerBitMask = ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1), my question is why is the shift performed on intptr_t? Wouldn't the following be ok? PointerBitMask = ~(((uintptr_t)1 << PtrTraits::NumLowBitsAvailable)-1), Thanks in advance, Maurizio
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...cator<unsigned char> >*, std::__debug::vector<short unsigned int, std::allocator<short unsigned int> >*, std::__debug::vector<unsigned int, std::allocator<unsigned int> >*, std::__debug::vector<long unsigned int, std::allocator<long unsigned int> >*>::NumLowBitsAvailable’: /home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:144:48: required from ‘struct llvm::PointerIntPairInfo<void*, 2, llvm::pointer_union_detail::PointerUnionUIntTraits<std::__debug::vector<unsigned char, std::allocator<unsigned char> >*, std::__debug::ve...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...d::__debug::vector<short >> unsigned int, std::allocator<short unsigned int> >*, >> std::__debug::vector<unsigned int, std::allocator<unsigned int> >*, >> std::__debug::vector<long unsigned int, std::allocator<long unsigned >> int> >*>::NumLowBitsAvailable’: >> /home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:144:48: >> required from ‘struct llvm::PointerIntPairInfo<void*, 2, >> llvm::pointer_union_detail::PointerUnionUIntTraits<std::__debug::vector<unsigned >> char, std::allocator<unsig...
2019 Oct 02
2
SourceMgr vs EXPENSIVE_CHECKS
...>> unsigned int, std::allocator<short unsigned int> >*, >> >> std::__debug::vector<unsigned int, std::allocator<unsigned int> >*, >> >> std::__debug::vector<long unsigned int, std::allocator<long unsigned >> >> int> >*>::NumLowBitsAvailable’: >> >> /home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:144:48: >> >> required from ‘struct llvm::PointerIntPairInfo<void*, 2, >> >> llvm::pointer_union_detail::PointerUnionUIntTraits<std::__debug::vector<unsigned >> &g...
2009 May 01
0
[LLVMdev] PointerIntPair causing trouble
Hi Nicolas, Looks like Preston and I have found the cause of the problem. The issue is with PointerLikeTypeTraits<T*>::NumLowBitsAvailable. This is set to 3, which basically assumes that unless the traits are specialized for a particular pointer type, objects of that type are allocated with malloc() and aligned to 8 bytes. While PointerLikeTypeTraits is overloaded for Use*, it is not overloaded for User*. lib/VMCore/Use.c...
2009 May 02
1
[LLVMdev] PointerIntPair causing trouble
On 2009-05-01, at 18:40, Stefanus Du Toit wrote: > Hi Nicolas, > > Looks like Preston and I have found the cause of the problem. The > issue is with PointerLikeTypeTraits<T*>::NumLowBitsAvailable. This > is set to 3, which basically assumes that unless the traits are > specialized for a particular pointer type, objects of that type are > allocated with malloc() and aligned to 8 bytes. > > While PointerLikeTypeTraits is overloaded for Use*, it is not > overloade...
2009 Oct 09
0
[LLVMdev] question on code in PointerIntPair.h
On Oct 8, 2009, at 10:50 AM, Maurizio Vitale wrote: > around line 45 a bitmask is computed as: > > PointerBitMask = > ~(uintptr_t)(((intptr_t)1 << PtrTraits::NumLowBitsAvailable)-1), > > my question is why is the shift performed on intptr_t? Wouldn't the > following be ok? > > PointerBitMask = > ~(((uintptr_t)1 << PtrTraits::NumLowBitsAvailable)-1), Hi Maurizio, why do you ask? Is the existing code causing a problem? -Chris
2009 Oct 09
1
[LLVMdev] question on code in PointerIntPair.h
...;>> "Chris" == Chris Lattner <clattner at apple.com> writes: Chris> On Oct 8, 2009, at 10:50 AM, Maurizio Vitale wrote: > around line 45 a bitmask is computed as: >> >> PointerBitMask = ~(uintptr_t)(((intptr_t)1 << >> PtrTraits::NumLowBitsAvailable)-1), >> >> my question is why is the shift performed on intptr_t? Wouldn't >> the following be ok? >> >> PointerBitMask = ~(((uintptr_t)1 << >> PtrTraits::NumLowBitsAvailable)-1), Chris> Hi Maurizio, why do you ask?...
2009 May 01
7
[LLVMdev] PointerIntPair causing trouble
Hi all, I've located a regression that causes my project to crash. It's in revision 67979, where PointerIntPair is changed from storing the integer in the upper bits instead of the lower bits. My project is an experimental JIT-compiler in Windows. So I was wondering if anyone had any clue why the new PointerIntPair implementation might fail. It doesn't seem very safe to me to
2009 May 02
2
[LLVMdev] PointerIntPair causing trouble
On May 1, 2009, at 3:40 PM, Stefanus Du Toit wrote: > Hi Nicolas, > > Looks like Preston and I have found the cause of the problem. The > issue is with PointerLikeTypeTraits<T*>::NumLowBitsAvailable. This > is set to 3, which basically assumes that unless the traits are > specialized for a particular pointer type, objects of that type are > allocated with malloc() and aligned to 8 bytes. I still don't understand why this is a problem, but I decreased the default to 2...