Displaying 9 results from an estimated 9 matches for "ptrtraits".
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
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 proble...
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...
2011 Dec 03
1
[LLVMdev] New strict-aliasing warning?
...gcc 4.1.2 on linux/ppc64, I now see a warning
that I don't remember seeing previously:
llvm[2]: Compiling InlineSpiller.cpp for Release+Asserts build
/src/llvm-trunk-dev/include/llvm/ADT/PointerIntPair.h: In member
function ‘const PointerTy* llvm::PointerIntPair<PointerTy, IntBits,
IntType, PtrTraits>::getAddrOfPointer() const [with PointerTy = void*,
unsigned int IntBits = 1u, IntType = bool, PtrTraits =
llvm::PointerUnionUIntTraits<llvm::VNInfo*,
llvm::SmallVector<llvm::VNInfo*, 4u>*>]’:
/src/llvm-trunk-dev/include/llvm/ADT/PointerUnion.h:153: instantiated
from ‘const PT1* ll...
2014 Dec 18
2
[LLVMdev] Please change the comment of 'insert' member function of SmallPtrSetImpl
...return value is changed from r222334.
But the comment of the function is same with before as follows:
/// insert - This returns true if the pointer was new to the set,
false if it
/// was already in the set.
std::pair<iterator, bool> insert(PtrType Ptr) {
auto p = insert_imp(PtrTraits::getAsVoidPointer(Ptr));
return std::make_pair(iterator(p.first, CurArray + CurArraySize),
p.second);
}
If the comment is changed, please change it.
Thanks,
JinGu Kang
2012 Mar 17
1
[LLVMdev] [llvm-commits] Review Request: Use SmallPtrSetImpl instead of SmallPtrSet in funciton IVUsers::AddUsersIfInteresting
...uot;insert" function...
After a detailed look at the header of SmallPtrSet, I found that the
SmallPtrSetImpl has an "insert_imp" function which accepts void
pointer as argument, and the "insert" function in SmallPtrSet simply
cast the incoming pointer to void* by the
"PtrTraits::getAsVoidPointer" function and pass the void pointer to
insert_imp.
So I wonder can we make SmallPtrSetImpl become a template just like
SmallVectorImpl? After that we can move insert/erase/count from
SmallPtrSet to SmallPtrSetImpl, and users can pass a
SmallPtrSetImpl<T> as argument in...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...int, std::allocator<unsigned int> >*,
std::__debug::vector<long unsigned int, std::allocator<long unsigned
int> >*> >’
/home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:71:32:
required from ‘void llvm::PointerIntPair<PointerTy, IntBits,
IntType, PtrTraits, Info>::initWithPointer(PointerTy) [with PointerTy
= void*; unsigned int IntBits = 2; IntType = int; PtrTraits =
llvm::pointer_union_detail::PointerUnionUIntTraits<std::__debug::vector<unsigned
char, std::allocator<unsigned char> >*, std::__debug::vector<short
unsigned int, std...
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
...*,
>> std::__debug::vector<long unsigned int, std::allocator<long unsigned
>> int> >*> >’
>> /home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:71:32:
>> required from ‘void llvm::PointerIntPair<PointerTy, IntBits,
>> IntType, PtrTraits, Info>::initWithPointer(PointerTy) [with PointerTy
>> = void*; unsigned int IntBits = 2; IntType = int; PtrTraits =
>> llvm::pointer_union_detail::PointerUnionUIntTraits<std::__debug::vector<unsigned
>> char, std::allocator<unsigned char> >*, std::__debug::vector...
2019 Oct 02
2
SourceMgr vs EXPENSIVE_CHECKS
...long unsigned int, std::allocator<long unsigned
>> >> int> >*> >’
>> >> /home/jayfoad2/git/llvm-project/llvm/include/llvm/ADT/PointerIntPair.h:71:32:
>> >> required from ‘void llvm::PointerIntPair<PointerTy, IntBits,
>> >> IntType, PtrTraits, Info>::initWithPointer(PointerTy) [with PointerTy
>> >> = void*; unsigned int IntBits = 2; IntType = int; PtrTraits =
>> >> llvm::pointer_union_detail::PointerUnionUIntTraits<std::__debug::vector<unsigned
>> >> char, std::allocator<unsigned char>...