search for: struct1

Displaying 11 results from an estimated 11 matches for "struct1".

Did you mean: struct
2019 Aug 20
2
missing simplification in ScalarEvolution?
Hi, I have this small test case- %struct1 = type { i32, i32 } @glob_const = internal constant [4 x %struct1] [%struct1 { i32 4, i32 5 }, %struct1 { i32 8, i32 9 }, %struct1 { i32 16, i32 0 }, %struct1 { i32 32, i32 10 }], align 16 define void @foo() { entry: br label %loop loop: ; preds = %...
2019 Aug 21
2
missing simplification in ScalarEvolution?
...with pointer size information to your reduced case, and see what happens.  Not sure this is your problem, but I've been bitten by this before with hand reduced examples... Philip On 8/20/19 3:43 PM, Chawla, Pankaj via llvm-dev wrote: > Hi, > > I have this small test case- > > %struct1 = type { i32, i32 } > > @glob_const = internal constant [4 x %struct1] [%struct1 { i32 4, i32 > 5 }, %struct1 { i32 8, i32 9 }, %struct1 { i32 16, i32 0 }, %struct1 { > i32 32, i32 10 }], align 16 > > define void @foo() { > entry: > br label %loop > > loop:...
2019 Aug 26
2
missing simplification in ScalarEvolution?
...ced case, and see what happens. Not sure this is your problem, but I've been bitten by this before with hand reduced examples... > > Philip > > On 8/20/19 3:43 PM, Chawla, Pankaj via llvm-dev wrote: > > Hi, > > > > I have this small test case- > > > > %struct1 = type { i32, i32 } > > > > @glob_const = internal constant [4 x %struct1] [%struct1 { i32 4, > > i32 > > 5 }, %struct1 { i32 8, i32 9 }, %struct1 { i32 16, i32 0 }, %struct1 > > { > > i32 32, i32 10 }], align 16 > > > > define void @foo() { > &g...
2008 Jun 06
1
calling a C function with a struct
...ion that uses a struct as one of it's arguments. I could write a wrapper function in C, but I was hoping there is some way to pack fields into an array of type raw that could be passed directly to the function. Here is some more detail. The C struct is simple, but has mixed types: struct STRUCT1 { long type; long nx; double *x; double a; double b; }; typedef struct STRUCT1 STRUCT1_TYPE; The C function header is void func1( long method, STRUCT1 my_struct, double *output); I would like to have an R list mimicking the C struct, and then use .C to...
2014 May 22
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...rk. I am currently building a stage2 now to see if works cleanly. Having said that, 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)...
2014 May 23
2
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
...is written using structs and the other > 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,...
2018 May 10
0
suboptimal type isomorphy handling involving opaque structs
In the following example, LLVM's logic for merging isomorphic types causes two functions 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 &a...
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 }
2014 May 22
4
[LLVMdev] RFC: Indexing of structs vs arrays in getelementpointer
Recently I posted a patch to migrate certain GEPs between basic blocks in cases where doing so would improve the ability of instcombine to merge into more complicated addressing mode (r209049 and r209065). After some build to failures it was rolled back. I now have a patch that no longer causes the regressions I was seeing, but it also no longer can optimize the case I was trying to optimize. As
2008 Jun 06
6
Subsetting to unique values
I want to take the first row of each unique ID value from a data frame. For instance > ddTable <- data.frame(Id=c(1,1,2,2),name=c("Paul","Joe","Bob","Larry")) I want a dataset that is Id Name 1 Paul 2 Bob > unique(ddTable) Will give me all 4 rows, and > unique(ddTable$Id) Will give me c(1,2), but not accompanied by the name column.