search for: reinterpret_casts

Displaying 20 results from an estimated 196 matches for "reinterpret_casts".

Did you mean: reinterpret_cast
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 07:53, David Blaikie <dblaikie at gmail.com> wrote: > Sounds like you're looking for reinterpret_cast: http://en. > cppreference.com/w/cpp/language/reinterpret_cast > I tried cast<ConstInt>(vo), but that failed at run-time. > > On Sun, Jun 11, 2017 at 3:06 AM Dipanjan Das via llvm-dev < > llvm-dev at lists.llvm.org> wrote: >
2012 Feb 15
3
[LLVMdev] We need better hashing
On Tue, Feb 14, 2012 at 2:44 AM, Chris Lattner <clattner at apple.com> wrote: > On Feb 13, 2012, at 2:00 AM, Talin wrote: > > Just out of curiosity, why not MurmurHash3 ? This page seems to >> suggest that #2 has some flaw, and #3 is better all round: >> >> https://sites.google.com/site/murmurhash/ >> >> The main reason is because there's no
2012 Feb 15
0
[LLVMdev] We need better hashing
On Feb 14, 2012, at 10:47 PM, Talin wrote: > /// Add a pointer value > template<typename T> > void add(const T *PtrVal) { > addImpl( > reinterpret_cast<const uint32_t *>(&PtrVal), > reinterpret_cast<const uint32_t *>(&PtrVal + 1)); > } > > This violates TBAA rules and looks pretty dangerous to expose as public API.
2012 Feb 14
0
[LLVMdev] We need better hashing
On Feb 13, 2012, at 2:00 AM, Talin wrote: > Just out of curiosity, why not MurmurHash3 ? This page seems to > suggest that #2 has some flaw, and #3 is better all round: > > https://sites.google.com/site/murmurhash/ > > The main reason is because there's no incremental version of 3. I think that that is a great reason. > LLVM's needs, on the other hand, are fairly
2013 Mar 13
0
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
On 3/12/2013 12:13 PM, Manman Ren wrote: > > Given > struct A { > int x; > int y; > }; > struct B { > A a; > int z; > }; > struct C { > B b1; > B b2; > }; > struct D { > C c; > }; > > with struct-access-path aware TBAA, C::b1.a.x does not alias with D::c.b2.a.x.
2013 Mar 12
3
[LLVMdev] PROPOSAL: struct-access-path aware TBAA
On Mar 12, 2013, at 8:22 AM, Krzysztof Parzyszek wrote: > What cases does this proposal solve that the current analyses don't? Do you have a motivating example? Given struct A { int x; int y; }; struct B { A a; int z; }; struct C { B b1; B b2; }; struct D { C c; }; with struct-access-path aware TBAA, C::b1.a.x does not alias with D::c.b2.a.x.
2012 Feb 13
5
[LLVMdev] We need better hashing
On Mon, Feb 13, 2012 at 1:22 AM, Jay Foad <jay.foad at gmail.com> wrote: > On 13 February 2012 00:59, Talin <viridia at gmail.com> wrote: > > Here's my latest version of Hashing.h, which I propose to add to > llvm/ADT. > > Comments welcome and encouraged. > > > /// Adapted from MurmurHash2 by Austin Appleby > > Just out of curiosity, why not
2007 Mar 06
1
Errors compiling flac in Visual Studio Express 2005
Hi! I have trouble compiling the flac library using Microsofts free (yes MS gives it away including the optimizing C++ compiler msvc8.0) Visual Studio Express 2005. I get the output shown below. Does anyone have a way to make flac compile in VS 2005? Thanks! Ulrik 1>------ Rebuild All started: Project: replaygain_analysis_static, Configuration: Debug Win32 ------ 1>Deleting
2013 May 10
4
[LLVMdev] [cfe-dev] "load groups" IR feature to improve C++ devirtualization
On 9 May 2013 19:13, John McCall <rjmccall at apple.com> wrote: > On May 9, 2013, at 6:34 PM, Nick Lewycky <nlewycky at google.com> wrote: > > I'm looking into how we can improve devirtualization in clang, and there > a language in C++ feature I'd like to take advantage of which would let us > perform elimination of more vptr loads. In this code: > > >
2017 Jun 11
2
Force casting a Value*
On 11 June 2017 at 11:32, Nikodemus Siivola <nikodemus at random-state.net> wrote: > On Sun, Jun 11, 2017 at 7:49 PM, Dipanjan Das via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> >> >> On 11 June 2017 at 07:53, David Blaikie <dblaikie at gmail.com> wrote: >> >>> Sounds like you're looking for reinterpret_cast: http://en.cp
2010 Aug 19
2
[LLVMdev] using external functions from llvm
Is there documentation somewhere on how to call external functions from llvm? The only guide I found was this: http://www.gearleaf.com/blog/post/44, and it doesn't seem to be working for me. I have a function: llvm::GenericValue lle_X_create_number_object(llvm::FunctionType* ft, const std::vector<llvm::GenericValue>& args) { llvm_object_structure* result = new
2010 May 20
0
[LLVMdev] Win32 COFF Support
On Wed, May 19, 2010 at 10:31 PM, Nathan Jeffords <blunted2night at gmail.com> wrote: > Hi guys, > I have attached my patch to support generating win32 COFF object files. I > would have posted earlier, but my system drive crashed and I had to rebuild > my system; Luckily, my source code was on a secondary drive. I think this > would be a good beginning for ongoing support of
2013 May 10
0
[LLVMdev] [cfe-dev] "load groups" IR feature to improve C++ devirtualization
On May 9, 2013, at 9:22 PM, Nick Lewycky <nlewycky at google.com> wrote: > On 9 May 2013 19:13, John McCall <rjmccall at apple.com> wrote: > This is not how I understand the [basic.life] rules. The question is whether a pointer value, reference, or name is formally forwarded to point to the new object. Because the dynamic type is different, the pointer value held in 'p'
2012 Feb 15
2
[LLVMdev] We need better hashing
On Tue, Feb 14, 2012 at 2:44 AM, Chris Lattner <clattner at apple.com> wrote: > On Feb 13, 2012, at 2:00 AM, Talin wrote: >> >> Just out of curiosity, why not MurmurHash3 ? This page seems to >> suggest that #2 has some flaw, and #3 is better all round: >> >> https://sites.google.com/site/murmurhash/ >> > The main reason is because there's no
2017 Jun 11
2
Force casting a Value*
I am trying to cast a Value* irrespective of its underlying subclass to uint64 and pass it on to a method as an argument. if (StoreInst *store_inst = dyn_cast<StoreInst>(&I)) { Value* vo = store_inst->getValueOperand(); uint64 value = /* cast vo to unsigned int 64 bit */ func(value); } How can I force
2013 May 10
0
[LLVMdev] [cfe-dev] "load groups" IR feature to improve C++ devirtualization
Hi Nick, Won't this approach run into problems with inlining, unrolling, or just about anything that duplicates code? Suppose I have a bunch of loads of the same load group in the body of the loop, but update the pointer they're dereferencing on the backedge. If that loop gets unrolled, all the loads in the unrolled copies will have the same load group, but it would not be correct to
2011 Jan 07
1
[LLVMdev] Problem returning structures by value from C
I have a simple structure in my program: struct pair { double value; int32_t type; }; Also I have 2 functions, which are called from LLVM code: extern "C" void dump(pair s) { unsigned char *p = reinterpret_cast<unsigned char *>(&s); printf("#dump, %02x%02x%02x%02x %02x%02x%02x%02x %02x%02x%02x%02x\n", p[0], p[1], p[2], p[3], p[4], p[5], p[6], p[7],
2016 Apr 27
4
RFC: LLD symbol table redesign
Hi all, This proposes a redesign of LLD’s symbol table in order to improve memory locality by minimizing indirection when resolving relocations. The key idea is that we perform symbol resolution by overwriting SymbolBodies, rather than by updating pointers. This is based on some ideas mentioned by Rafael on IRC. Conceptually, we split Symbol into a non-polymorphic part and a polymorphic part (a
2010 Aug 19
3
[LLVMdev] using external functions from llvm
The blog post I linked to implied that adding a symbol in the form lle_X_FUNCTIONNAME would allow you to call a function called FUNCTIONNAME. Is this not the case? On Thu, Aug 19, 2010 at 6:46 PM, <o.j.sivart at gmail.com> wrote: > You are adding the symbol as "lle_X_create_number_object" yet your error > message implies you have tried to lookup and use
2018 Jan 24
2
[llvm] r322838 - [ADT] Split optional to only include copy mechanics and dtor for non-trivial types.
Hey Ben, This change broke some clangd code (no failing test, mea culpa), because it changed the move semantics. Previously: a moved-from llvm::Optional was None (for all types). Now: a moved-from llvm::Optional is None (for non-trivial types), and has the old value (for trivial types). FWIW, a moved-from std::optional is *not* nullopt, and contains the moved-from value. This seems sad to me,