similar to: [LLVMdev] question on code in PointerIntPair.h

Displaying 20 results from an estimated 300 matches similar to: "[LLVMdev] question on code in PointerIntPair.h"

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
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 <<
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
Hi, I'm trying to build llvm (git monorepo) on Ubuntu 18.04 with EXPENSIVE_CHECKS enabled and running into various errors compiling SourceMgr.cpp, depending on which host compiler I use. For example with GCC: $ CC=gcc-8 CXX=g++-8 cmake -GNinja -DCMAKE_BUILD_TYPE=Debug -DLLVM_ENABLE_EXPENSIVE_CHECKS=ON ~/git/llvm-project/llvm/ && ninja ... [89/2690] Building CXX object
2019 Sep 03
2
SourceMgr vs EXPENSIVE_CHECKS
Hmm. What about the errors I quoted from using clang-7 (starting about a third of the way down my email, sorry if they got kinda lost in all the noise)? Thanks, Jay. On Tue, 3 Sep 2019 at 20:00, David Blaikie <dblaikie at gmail.com> wrote: > > Looks to me like a bug in GCC's constexpr+_GLIBCXX_CONCEPT_CHECKS support. Small test case: > > $ g++-8 test.cpp -std=c++2a
2019 Oct 02
2
SourceMgr vs EXPENSIVE_CHECKS
I just ran into this today. Do we need to update our requirements on libstdc++ version? Jay, did you figure out a way around this? On Wed, Sep 4, 2019 at 5:29 AM David Blaikie via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > It's a bug in libstdc++ - so if you have clang using libstdc++ (which it will by default, I think) then it's the same thing. You could try with
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()
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
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
2011 Dec 03
1
[LLVMdev] New strict-aliasing warning?
When compiling trunk using 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
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
2014 Dec 18
2
[LLVMdev] Please change the comment of 'insert' member function of SmallPtrSetImpl
Hi all, I have a compilation failure with 'insert' member function of SmallPtrSetImpl class because the 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
2012 Mar 17
1
[LLVMdev] [llvm-commits] Review Request: Use SmallPtrSetImpl instead of SmallPtrSet in funciton IVUsers::AddUsersIfInteresting
hi, On Sat, Mar 17, 2012 at 2:11 AM, Andrew Trick <atrick at apple.com> wrote: > Yep. I normally do that. I was under some strange impression last night that SmallPtrSetImpl wasn't a template. The patch is incorrect because the SmallPtrSetImpl is neither a template nor has an "insert" function... After a detailed look at the header of SmallPtrSet, I found that the
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
llvm::PointerIntPair<double*, 3, signed> P; P.setInt(-4); Ideally, the value range for a 3-bit signed integer should be [-4,3]. But the above call to setInt will fail. Essentially, the signed int field in PointerIntPair is behaving the same as an 3-bit unsigned field which has the legal value range of [0,7]. Is this by design? Are negative values not allowed in PointerIntPair? /Riyaz
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
Hi, On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote: > llvm::PointerIntPair<double*, 3, signed> P; > > P.setInt(-4); > > Ideally, the value range for a 3-bit signed integer should be [-4,3]. > But the above call to setInt will fail. Essentially, the signed int > field in PointerIntPair is behaving the same as an 3-bit unsigned field > which has the
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
On 04/04/2018 11:15, David Chisnall wrote: > On 4 Apr 2018, at 11:01, Florian Hahn via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> >> Hi, >> >> On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote: >>> llvm::PointerIntPair<double*, 3, signed> P; >>> P.setInt(-4); >>> Ideally, the value range for a 3-bit signed integer
2009 May 01
0
[LLVMdev] PointerIntPair causing trouble
Hi Nicolas, On 1-May-09, at 6:32 AM, Nicolas Capens wrote: > 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. We're looking into a similar bug right now. We see the problem
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
On 4 Apr 2018, at 11:01, Florian Hahn via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi, > > On 04/04/2018 05:34, Riyaz Puthiyapurayil via llvm-dev wrote: >> llvm::PointerIntPair<double*, 3, signed> P; >> P.setInt(-4); >> Ideally, the value range for a 3-bit signed integer should be [-4,3]. But the above call to setInt will fail. Essentially, the
2018 Apr 04
0
llvm::PointerIntPair -- is this by design or a bug?
I'd suggest someone try fixing this & see if it breaks anything that can't reasonably be fixed (before we go assuming this is by design/shouldn't be fixed just because it's the way it is today). On Wed, Apr 4, 2018 at 7:16 AM Riyaz Puthiyapurayil via llvm-dev < llvm-dev at lists.llvm.org> wrote: > It won't move the sign bit, so negative values won't fit,
2009 May 04
0
[LLVMdev] PointerIntPair causing trouble
On 4-May-09, at 4:15 PM, OvermindDL1 wrote: > Actually, I am *very* curious if this is the bug. I can try to see if > it is now that I know what to look for (or if you fix it in SVN then I > will first make sure the bug still exists in mine, when it does then I > will update LLVM to the latest trunk and test again, if it was fixed > that I will be giving many thanks), but the
2018 Apr 04
2
llvm::PointerIntPair -- is this by design or a bug?
It won't move the sign bit, so negative values won't fit, unless you have a 3 bit signed type ;) Note that if you assign negative values to and then read from a signed bit-field, you would do sign extension. So 3-bit signed types do exist in C++. It begs the question why PointerIntPair supports signed int types if it always loses the sign. Is it just to avoid signed/unsigned comparison