search for: mystruct

Displaying 20 results from an estimated 51 matches for "mystruct".

2012 Nov 01
2
[LLVMdev] llvm linking issue
I have three modules: ----------------------------------------------------------------- s1.ll: %0 = type <{ i32, i32 }> define void @s1(%0* byval %myStruct) nounwind { return: ret void } ----------------------------------------------------------------- s2.ll: %0 = type <{ i32, i32 }> define void @s2(%0* byval %myStruct) nounwind { return: ret void } ----------------------------------------------------------------- s3.ll: %0 = type <{ i3...
2012 Nov 01
0
[LLVMdev] llvm linking issue
..., this looks like a bug to me - please file a bug report. Ciao, Duncan. On 01/11/12 04:35, Guo, Xiaoyi wrote: > I have three modules: > ----------------------------------------------------------------- > s1.ll: > > %0 = type <{ i32, i32 }> > > define void @s1(%0* byval %myStruct) nounwind { > return: > ret void > } > ----------------------------------------------------------------- > s2.ll: > > %0 = type <{ i32, i32 }> > > define void @s2(%0* byval %myStruct) nounwind { > return: > ret void > } > --------------------------...
2012 Oct 25
2
[LLVMdev] A question about pointer aliasing rules in LLVM
Hi, I have the following IR code </snippet> %prev = getelementptr inbounds %struct.myStruct* %node, i32 0, i32 1 %1 = load %struct.myStruct** %prev, align 4, !tbaa !0 %next1 = getelementptr inbounds %struct.myStruct* %1, i32 0, i32 0 store %struct.myStruct* %0, %struct.myStruct** %next1, align 4, !tbaa !0 %2 = load %struct.myStruct** %prev, align 4, !tbaa ! </snippet> myStruct is d...
2020 Jan 21
4
aarch64 does not emit DW_AT_Location
Hi Devs, debug info emitted by llvm does not contain DW_AT_Location for Formal parameter if it is an aggregate like below case 1) aggregate contain more than 4 homogeneous and size more than 128 bits i.e. typedef struct{ int a,b,c,d,e; }mystruct; void foo(mystruct ms){ } 2) aggregate contain hetrogeneous type and size more than 128 bits. i.e. typedef struct{ int a,b; float c,d,e; }mystruct; void foo(mystruct ms){ } This occur only when aarch64 is used, not with arm and x86. like to know community thoughts wether this can be considered a...
2012 Oct 25
0
[LLVMdev] A question about pointer aliasing rules in LLVM
On Thu, Oct 25, 2012 at 3:15 PM, Pranav Bhandarkar <pranavb at codeaurora.org>wrote: > Hi, > > I have the following IR code > > </snippet> > %prev = getelementptr inbounds %struct.myStruct* %node, i32 0, i32 1 > %1 = load %struct.myStruct** %prev, align 4, !tbaa !0 > %next1 = getelementptr inbounds %struct.myStruct* %1, i32 0, i32 0 > store %struct.myStruct* %0, %struct.myStruct** %next1, align 4, !tbaa !0 > %2 = load %struct.myStruct** %prev, align 4, !tbaa ! > </s...
2002 Sep 28
2
[LLVMdev] Directory and library rename:
By request, I've renamed lib/CodeGen/PreSelection to lib/CodeGen/PreOpts (admittedly this was my choice :-), and the corresponding archive from preselect to preopt. If you see linker errors saying preselect.o is not found, this is the reason. This shouldn't happen if you update your entire tree at once. --Vikram
2002 Sep 29
1
[LLVMdev] the getelementptr noop problem
> so i confess i'm still not clear on what the first index into > getelementptr is all about. I'm sure you're not the only one. :) This is one of the wierdest aspects of LLVM to the unaccustomed. > it makes perfect sense for an example like > getelementptr %mystruct * %reg100 > to just return a %mystruct * equivalent to %reg100. > > it does *not* make sense to me that > getelementptr %mystruct * %reg100, uint 0 > should act the same. for look, what this speaks of to me is indexing the > first element in an array. if we are careful to cast i...
2020 Jul 09
2
Understand alias-analysis results
Hello, I am performing alias analysis toward the following simple code: struct MyStruct { int * f1; int * f2; }; void NOALIAS(void* p, void* q){ } int main() { struct MyStruct s[2]; int a,b; s[0].f1 = &a; s[1].f1 = &b; NOALIAS(s[a].f1, s[b].f2); return 0; } When I use the following command to generate .bc code and conduct alias analysis: clang -c -emit-llvm t.c -O2 opt -...
2012 Dec 30
0
[LLVMdev] Cannot interchange "literal" and "identified" structs
Justin, http://llvm.org/docs/LangRef.html#structure-type "Identified types can be recursive, can be opaqued, and are never uniqued." Do you think it would be less descriptive? "Identified type, aka named llvm::StructType, is never uniqued against other identified types nor literal types, aka unnamed StructType(s)." ? See also;
2019 Mar 08
1
[RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address
...be multiple asynchronous concurrent invalidate_range callbacks. So a flag does not work but a counter of number of active invalidation would. See how KSM is doing it for instance in kvm_main.c The pattern for this kind of thing is: my_invalidate_range_start(start,end) { ... if (mystruct_overlap(mystruct, start, end)) { mystruct_lock(); mystruct->invalidate_count++; ... mystruct_unlock(); } } my_invalidate_range_end(start,end) { ... if (mystruct_overlap(mystruct, start, end)) { mystruct_...
2019 Mar 08
1
[RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address
...be multiple asynchronous concurrent invalidate_range callbacks. So a flag does not work but a counter of number of active invalidation would. See how KSM is doing it for instance in kvm_main.c The pattern for this kind of thing is: my_invalidate_range_start(start,end) { ... if (mystruct_overlap(mystruct, start, end)) { mystruct_lock(); mystruct->invalidate_count++; ... mystruct_unlock(); } } my_invalidate_range_end(start,end) { ... if (mystruct_overlap(mystruct, start, end)) { mystruct_...
2012 Dec 30
2
[LLVMdev] Cannot interchange "literal" and "identified" structs
With primitive types, I can interchange literal usage and type aliases in IR: %mytype = type i32 define void @foo(%mytype* %ptr) { %t1 = load *%mytype** %ptr store i32 *%t1*, *i32** %ptr ret void } But for structs, I cannot: %mytype = type { i32, i32 } define void @foo(%mytype* %ptr) { %t1 = load *%mytype** %ptr store* { i32, i32 }* %t1, *{ i32, i32 }** %ptr ret void }
2011 Oct 07
1
Handling Time in R
Dear all, I would like to ask your help regarding handling time stamps in R. I think first I need a reference to read about their logic and how I should handle them. For example, this is a struct I have str(MyStruct$TimeStamps)  num [1:100, 1:6] 2011 2011 2011 2011 2011 ... MyStruct$TimeStamps[1,] [1] 2011.000   10.000    6.000   16.000   23.000   30.539 the last field contains seconds.milliseconds. How I can for example make calculations with time stamps like see if the  MyStruct$TimeStamps[1,]-MyStruct$Ti...
2002 Sep 28
0
[LLVMdev] the getelementptr noop problem
so i confess i'm still not clear on what the first index into getelementptr is all about. it makes perfect sense for an example like getelementptr %mystruct * %reg100 to just return a %mystruct * equivalent to %reg100. it does *not* make sense to me that getelementptr %mystruct * %reg100, uint 0 should act the same. for look, what this speaks of to me is indexing the first element in an array. if we are careful to cast it back to %mystruct *, then i...
2011 Jan 12
2
[LLVMdev] Wrong assembly is written for x86_64 target in JIT without optimization?
...optimization I get SEGV. Looking at assembly (below) I see that the local value 0xffffffffffffffe0(%rbp) is used without being ever initialized (see my comment in asm). Same code on i386 works fine, with and w/out optimization. My guess is that this is a bug in LLVM. Yuri --- llvm --- %struct.mystruct = type { i32, i8, i8, i8, i8 } define i32 @xfunc(%struct.mystruct* %a1, %struct.mystruct* %a2) { br label %lbl1 lbl1: %v1 = call i32 @yfunc(i32 1, i32 0, i32 0) %v2 = bitcast %struct.mystruct* %a1 to i8* %v3 = getelementptr i8* %v2, i32 %v1 %v4 = bitcast i8* %v3 to i32* %v5 = loa...
2012 Sep 19
3
[LLVMdev] newbie question on getelementptr
...gt;getGlobalVariable("myGV"); ... Constant* result = ConstantExpr::getGetElementPtr(retrieved, indices); How do I get my Function back from the Constant* result? I'd like to be able to run the function. result->dump() shows the following: i32 (i32, i32)** getelementptr inbounds (%myStruct* @myGV, i32 0, i32 0) Many thanks, Jay -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120919/4043bafc/attachment.html>
2020 Jul 09
2
Understand alias-analysis results
...it is indeterminate and undefined behavior.) > > *** IR Dump After Promote Memory to Register *** > > ; the following corresponds to loading `s[a].f1` > %3 = load i32, i32* %a, align 4, !tbaa !7 > %idxprom = sext i32 %3 to i64 > %arrayidx3 = getelementptr inbounds [2 x %struct.MyStruct], [2 x > %struct.MyStruct]* %s, i64 0, i64 %idxprom > %f14 = getelementptr inbounds %struct.MyStruct, %struct.MyStruct* > %arrayidx3, i32 0, i32 0 > %4 = load i32*, i32** %f14, align 16, !tbaa !2 > %5 = bitcast i32* %4 to i8* > > ; the following corresponds to loading `s[b].f2`...
2019 Mar 11
0
[RFC PATCH V2 5/5] vhost: access vq metadata through kernel virtual address
...nvalidate_range > callbacks. So a flag does not work but a counter of number of active > invalidation would. See how KSM is doing it for instance in kvm_main.c > > The pattern for this kind of thing is: > my_invalidate_range_start(start,end) { > ... > if (mystruct_overlap(mystruct, start, end)) { > mystruct_lock(); > mystruct->invalidate_count++; > ... > mystruct_unlock(); > } > } > > my_invalidate_range_end(start,end) { > ... > if (mystr...
2012 Sep 19
0
[LLVMdev] newbie question on getelementptr
...32:32-i64:64:64-f32:32:32-f64:64:64-v64:64:64-v128:128:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64-S128"); module->setTargetTriple("x86_64-unknown-linux-gnu"); Function *func_add = CreateAddFunction(module); // create a StructType to contain func_add StructType *myStructType = StructType::create(module->getContext(), "myStruct"); std::vector<Type*> fields; fields.push_back(func_add->getType()); if (myStructType->isOpaque()) { myStructType->setBody(fields, /*isPacked=*/false); } string myGVName = "myGV&q...
2019 Feb 21
2
If there are some passes in LLVM do the opposite of the SROA(Scalar Replacement of Aggregates) pass
Hi LLVM developers, We tried to find if there are some passes in LLVM do the opposite of the SROA(Scalar Replacement of Aggregates) pass, but did not find one. Do we have this kind of pass to bring back the structure type? Or this is done separately in any transformation passes? Thanks, Lin-Ya -------------- next part -------------- An HTML attachment was scrubbed... URL: