Displaying 6 results from an estimated 6 matches for "struct2".
Did you mean:
struct
2014 May 22
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...at, there still exist cases where you are indexing into a homogenous struct like so. Consider the following two functions, which are the same except one is written using structs and the other is written using arrays:
%struct1 = type { i32, i32 }
%struct2 = type { %struct1, %struct1 }
; Function Attrs: ssp uwtable
define i32 @test1(%struct2* %dm, i1 %tmp4, i64 %tmp9, i64 %tmp19) {
bb:...
2014 May 22
4
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...;GEP->LOAD chain. Currently the first GEP and the GEP->LOAD are being matched separately into the leaq and movl respectively. I wrote some code to move GEPs across PHIs so that the whole GEP->GEP->LOAD could be matched, and it first glance it worked and generated the optimized movl:
%struct2 = type { i32, i32 }
bb1:...
2014 May 23
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...ther
> is written using arrays:
>
>
> Ah, delightful. I was pretty sure there was a more complex example
> that still exhibited the problem, but wanted to see it to think
> through things properly.
>
>
>
>
>
>
>
> %struct1 = type { i32, i32 }
> %struct2 = type { %struct1, %struct1 }
> ; Function Attrs: ssp uwtable
> define i32 @test1(%struct2* %dm, i1 %tmp4, i64 %tmp9, i64 %tmp19) {
> bb:
> br i1 %tmp4, label %bb1, label %bb2
> bb1: ; preds = %bb5
> %tmp10 = getelementptr inbounds %struct2* %dm, i64 %tmp9, i32 0
> br label %bb...
2018 May 10
0
suboptimal type isomorphy handling involving opaque structs
...ns in different compilation units with identical
function signatures to have different signatures in the resulting
bitcode:
===========================
$ cat demo-struct1.c
struct foo { int x; };
struct bar { int x; };
struct foo *return_arg_1(struct foo *a, struct bar *b) { return a; }
$ cat demo-struct2.c
struct foo;
struct bar;
struct foo *return_arg_2(struct foo *a, struct bar *b) { return a; }
$ ~/git/foreign/llvm-build/bin/clang -c -emit-llvm demo-struct1.c &&
~/git/foreign/llvm-build/bin/clang -c -emit-llvm demo-struct2.c &&
~/git/foreign/llvm-build/bin/llvm-link demo-struct1....
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;
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
}