search for: bptr

Displaying 9 results from an estimated 9 matches for "bptr".

Did you mean: b_ptr
2019 Nov 28
2
Question on TBAA and optimization
TBAA Question. Please consider the following test case. ---Snip-- struct B { int b1; int b2; }; struct C { int b1; }; struct A { int a1; struct C SC; int a2; }; int foo1(struct A * Aptr, struct B* Bptr) { int *a = &Aptr->SC.b1; *a=10; Bptr->b1 = 11; return *a; } int foo2(struct A * Aptr, struct B* Bptr) { Aptr->SC.b1=10; Bptr->b1 = 11; return Aptr->SC.b1; } ---Snip-- The structure pointers "Aptr" and "Bptr" will not alias each other in...
2007 Jan 25
5
Custom com32
Hi all I've written a basic COM32 module that checks (using the DMI example code) the product and BIOS and if the BIOS is not at the required level, is supposed to exit and boot using a DOS floppy image to flash the BIOS. The problem is that I can't work out how to call the DOS floppy image. Looking at the website, I see "Run Command" AX=0003H via int 22. The image name will
2014 Oct 03
2
[LLVMdev] Weird problems with cos (was Re: [PATCH v3 2/3] R600: Add carry and borrow instructions. Use them to implement UADDO/USUBO)
...o_i32(i32 addrspace(1)* %out, i1 addrspace(1)* %carryout, i32 > > ; FUNC-LABEL: @v_uaddo_i32 > ; SI: V_ADD_I32 > + > +; EG: ADDC_UINT > +; EG: ADD_INT > define void @v_uaddo_i32(i32 addrspace(1)* %out, i1 addrspace(1)* %carryout, i32 addrspace(1)* %aptr, i32 addrspace(1)* %bptr) nounwind { > %a = load i32 addrspace(1)* %aptr, align 4 > %b = load i32 addrspace(1)* %bptr, align 4 > @@ -45,6 +54,9 @@ define void @v_uaddo_i32(i32 addrspace(1)* %out, i1 addrspace(1)* %carryout, i32 > ; FUNC-LABEL: @s_uaddo_i64 > ; SI: S_ADD_U32 > ; SI: S_ADDC_U32 &gt...
2020 May 18
2
LV: predication
...xplicit hwloops work with the VP intrinsics - in a way that does not break with optimizations: vector.preheader: %evl = i32 llvm.hwloop.set.elements(%n) vector.body: %lastevl = phi 32 [%evl, %preheader, %next.evl, vector.body] %aval = call @llvm.vp.load(Aptr, .., %evl) call @llvm.vp.store(Bptr, %aval, ..., %evl) %next.evl = call i32 @llvm.hwloop.decrement(%evl) Note that the way VP intrinsics are designed, it is not possible to break this code by hoisting the VP calls out of the loop: passing "%evl >= the operation's vector size" consitutes UB (see https://llvm.org/do...
2020 May 19
3
LV: predication
...had an example on how %evl could be tied to the scalar trip count. Re-posting that here: vector.preheader: %init.evl = i32 llvm.hwloop.set.elements(%n) vector.body: %evl = phi 32 [%init.evl, %preheader, %next.evl, vector.body] %aval = call @llvm.vp.load(Aptr, .., %evl) call @llvm.vp.store(Bptr, %aval, ..., %evl) %next.evl = call i32 @llvm.hwloop.decrement(%evl) - Simon Cheers. ________________________________ From: Simon Moll <Simon.Moll at EMEA.NEC.COM><mailto:Simon.Moll at EMEA.NEC.COM> Sent: 18 May 2020 14:11 To: Sjoerd Meijer <Sjoerd.Meijer at arm.com><mai...
2020 May 19
2
LV: predication
...whether all instructions consume some predicate or only masked loads/stores: vector.preheader: %init.evl = i32 llvm.hwloop.set.elements(%n) vector.body: %evl = phi 32 [%init.evl, %preheader, %next.evl, vector.body] %aval = call @llvm.vp.load(Aptr, .., %evl) call @llvm.vp.store(Bptr, %aval, ..., %evl) %next.evl = call i32 @llvm.hwloop.decrement(%evl) No difference in that the problem remains that we have a random intrinsic sitting in the preheader describing a loop property that needs to be maintained. So, eliminating hardware loops and intrinsic that defines the number...
2020 May 18
2
LV: predication
...xplicit hwloops work with the VP intrinsics - in a way that does not break with optimizations: vector.preheader: %evl = i32 llvm.hwloop.set.elements(%n) vector.body: %lastevl = phi 32 [%evl, %preheader, %next.evl, vector.body] %aval = call @llvm.vp.load(Aptr, .., %evl) call @llvm.vp.store(Bptr, %aval, ..., %evl) %next.evl = call i32 @llvm.hwloop.decrement(%evl) Note that the way VP intrinsics are designed, it is not possible to break this code by hoisting the VP calls out of the loop: passing "%evl >= the operation's vector size" consitutes UB (see https://llvm.org/do...
2020 May 04
3
LV: predication
Hi Roger, That's a good example, that shows most of the moving parts involved here. In a nutshell, the difference is, and what we would like to make explicit, is the vector trip versus the scalar loop trip count. In your IR example, the loads/stores are predicated on a mask that is calculated from a splat induction variable, which is compared with the vector trip count. Illustrated with your
2017 Jun 21
6
RFC: Cleaning up the Itanium demangler
...r!=(const malloc_alloc<T>& x, const malloc_alloc<U>& y) noexcept +{ + return !(x == y); +} + +const size_t bs = 4 * 1024; +template <class T> using Alloc = short_alloc<T, bs>; +template <class T> using Vector = std::vector<T, Alloc<T>>; + +struct bptr +{ + static constexpr size_t alloc_size = 2048; + + struct meta + { + meta* next; + unsigned current; + }; + + meta* buf = nullptr; + + void grow() + { + char* new_meta = new char[alloc_size]; + buf = new (new_meta) meta{buf, 0}; + } + +public: +...