search for: arg_ptr

Displaying 20 results from an estimated 28 matches for "arg_ptr".

2013 Oct 29
2
[LLVMdev] Loop vectorizer dosen't find loop bounds
Thanks for the alternatives! I am trying the 'extracting sub-function' approach. However, it seems I can't get the 'subfunction' to pass the verifier. This is my subfunction: define void @main_extern([8 x i8]* %arg_ptr) { entrypoint: %0 = getelementptr [8 x i8]* %arg_ptr, i32 0 %1 = bitcast [8 x i8]* %0 to i64* %2 = load i64* %1 %3 = getelementptr [8 x i8]* %arg_ptr, i32 1 %4 = bitcast [8 x i8]* %3 to i64* %5 = load i64* %4 %6 = getelementptr [8 x i8]* %arg_ptr, i32 2 %7 = bitcast [8 x i8]...
2013 Oct 29
0
[LLVMdev] Loop vectorizer dosen't find loop bounds
...--- Original Message ----- > Thanks for the alternatives! > > I am trying the 'extracting sub-function' approach. However, it seems > I > can't get the 'subfunction' to pass the verifier. This is my > subfunction: > > define void @main_extern([8 x i8]* %arg_ptr) { > entrypoint: > %0 = getelementptr [8 x i8]* %arg_ptr, i32 0 > %1 = bitcast [8 x i8]* %0 to i64* > %2 = load i64* %1 > %3 = getelementptr [8 x i8]* %arg_ptr, i32 1 > %4 = bitcast [8 x i8]* %3 to i64* > %5 = load i64* %4 > %6 = getelementptr [8 x i8]*...
2013 Oct 28
2
[LLVMdev] Loop vectorizer dosen't find loop bounds
Bingo! That works (when coming from C source) Now, I have a serious problem. I am not coming from C but I build the function with the builder. I am also forced to change the signature and load the pointers a,b,c afterwards: define void @bar([8 x i8]* nocapture readonly %arg_ptr) #0 { entrypoint: %0 = bitcast [8 x i8]* %arg_ptr to i32* %1 = load i32* %0, align 4 %2 = getelementptr [8 x i8]* %arg_ptr, i64 1 %3 = bitcast [8 x i8]* %2 to i32* %4 = load i32* %3, align 4 %5 = getelementptr [8 x i8]* %arg_ptr, i64 2 %6 = bitcast [8 x i8]* %5 to float** %7...
2013 Oct 28
0
[LLVMdev] Loop vectorizer dosen't find loop bounds
...hat works (when coming from C source) > > Now, I have a serious problem. I am not coming from C but I build the > function with the builder. I am also forced to change the signature > and > load the pointers a,b,c afterwards: > > define void @bar([8 x i8]* nocapture readonly %arg_ptr) #0 { > entrypoint: > %0 = bitcast [8 x i8]* %arg_ptr to i32* > %1 = load i32* %0, align 4 > %2 = getelementptr [8 x i8]* %arg_ptr, i64 1 > %3 = bitcast [8 x i8]* %2 to i32* > %4 = load i32* %3, align 4 > %5 = getelementptr [8 x i8]* %arg_ptr, i64 2 > %6...
2013 Oct 26
2
[LLVMdev] Why is the loop vectorizer not working on my function?
...test.ll' target datalayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:12 8:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" target triple = "x86_64-unknown-linux-elf" define void @bar([8 x i8]* %arg_ptr) { entrypoint: %0 = bitcast [8 x i8]* %arg_ptr to i32* %1 = load i32* %0 %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 %3 = bitcast [8 x i8]* %2 to i32* %4 = load i32* %3 %5 = getelementptr [8 x i8]* %arg_ptr, i32 2 %6 = bitcast [8 x i8]* %5 to float** %7 = load float** %6...
2013 Oct 26
3
[LLVMdev] Why is the loop vectorizer not working on my function?
...:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:12 > > 8:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" > > > > target triple = "x86_64-unknown-linux-elf" > > > > define void @bar([8 x i8]* %arg_ptr) { > > entrypoint: > > %0 = bitcast [8 x i8]* %arg_ptr to i32* > > %1 = load i32* %0 > > %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 > > %3 = bitcast [8 x i8]* %2 to i32* > > %4 = load i32* %3 > > %5 = getelementptr [8 x i8]* %arg_ptr, i32 2 > &gt...
2013 Oct 26
2
[LLVMdev] Why is the loop vectorizer not working on my function?
...float* C) { for (int i=start; i<end;++i) A[i] = B[i] * C[i]; } This looks pretty much like the standard example. However, I built the function with the IRBuilder, thus not coming from C and clang. Also I changed slightly the function's signature: define void @bar([8 x i8]* %arg_ptr) { entrypoint: %0 = bitcast [8 x i8]* %arg_ptr to i32* %1 = load i32* %0 %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 %3 = bitcast [8 x i8]* %2 to i32* %4 = load i32* %3 %5 = getelementptr [8 x i8]* %arg_ptr, i32 2 %6 = bitcast [8 x i8]* %5 to float** %7 = load float** %6...
2013 Oct 26
0
[LLVMdev] Why is the loop vectorizer not working on my function?
...alayout = "e-p:64:64:64-S128-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:12 > 8:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" > > target triple = "x86_64-unknown-linux-elf" > > define void @bar([8 x i8]* %arg_ptr) { > entrypoint: > %0 = bitcast [8 x i8]* %arg_ptr to i32* > %1 = load i32* %0 > %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 > %3 = bitcast [8 x i8]* %2 to i32* > %4 = load i32* %3 > %5 = getelementptr [8 x i8]* %arg_ptr, i32 2 > %6 = bitcast [8 x i8]* %5 to float**...
2013 Oct 26
0
[LLVMdev] Why is the loop vectorizer not working on my function?
...:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:12 >>> 8:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" >>> >>> target triple = "x86_64-unknown-linux-elf" >>> >>> define void @bar([8 x i8]* %arg_ptr) { >>> entrypoint: >>> %0 = bitcast [8 x i8]* %arg_ptr to i32* >>> %1 = load i32* %0 >>> %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 >>> %3 = bitcast [8 x i8]* %2 to i32* >>> %4 = load i32* %3 >>> %5 = getelementptr [8 x i8...
2013 Oct 26
2
[LLVMdev] Why is the loop vectorizer not working on my function?
...[i] = B[i] * C[i]; >> } >> >> This looks pretty much like the standard example. However, I built the function >> with the IRBuilder, thus not coming from C and clang. Also I changed slightly >> the function's signature: >> >> define void @bar([8 x i8]* %arg_ptr) { >> entrypoint: >> %0 = bitcast [8 x i8]* %arg_ptr to i32* >> %1 = load i32* %0 >> %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 >> %3 = bitcast [8 x i8]* %2 to i32* >> %4 = load i32* %3 >> %5 = getelementptr [8 x i8]* %arg_ptr, i32 2 >>...
2013 Oct 26
0
[LLVMdev] Why is the loop vectorizer not working on my function?
...This looks pretty much like the standard example. However, I built > >> the function > >> with the IRBuilder, thus not coming from C and clang. Also I > >> changed slightly > >> the function's signature: > >> > >> define void @bar([8 x i8]* %arg_ptr) { > >> entrypoint: > >> %0 = bitcast [8 x i8]* %arg_ptr to i32* > >> %1 = load i32* %0 > >> %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 > >> %3 = bitcast [8 x i8]* %2 to i32* > >> %4 = load i32* %3 > >> %5 = getelementptr...
2013 Oct 27
3
[LLVMdev] Why is the loop vectorizer not working on my function?
...2:32:32-i64:64:64-f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:12 >>>> 8:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" >>>> >>>> target triple = "x86_64-unknown-linux-elf" >>>> >>>> define void @bar([8 x i8]* %arg_ptr) { >>>> entrypoint: >>>> %0 = bitcast [8 x i8]* %arg_ptr to i32* >>>> %1 = load i32* %0 >>>> %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 >>>> %3 = bitcast [8 x i8]* %2 to i32* >>>> %4 = load i32* %3 >>>> %5 =...
2013 Oct 26
0
[LLVMdev] Why is the loop vectorizer not working on my function?
...i<end;++i) > A[i] = B[i] * C[i]; > } > > This looks pretty much like the standard example. However, I built the function > with the IRBuilder, thus not coming from C and clang. Also I changed slightly > the function's signature: > > define void @bar([8 x i8]* %arg_ptr) { > entrypoint: > %0 = bitcast [8 x i8]* %arg_ptr to i32* > %1 = load i32* %0 > %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 > %3 = bitcast [8 x i8]* %2 to i32* > %4 = load i32* %3 > %5 = getelementptr [8 x i8]* %arg_ptr, i32 2 > %6 = bitcast [8 x i8]* %5 to float**...
2013 Oct 27
0
[LLVMdev] Why is the loop vectorizer not working on my function?
...f16:16:16-f32:32:32-f64:64:64-f128:128:128-v64:64:64-v128:12 >>>>> 8:128-a0:0:64-s0:64:64-f80:128:128-n8:16:32:64" >>>>> >>>>> target triple = "x86_64-unknown-linux-elf" >>>>> >>>>> define void @bar([8 x i8]* %arg_ptr) { >>>>> entrypoint: >>>>> %0 = bitcast [8 x i8]* %arg_ptr to i32* >>>>> %1 = load i32* %0 >>>>> %2 = getelementptr [8 x i8]* %arg_ptr, i32 1 >>>>> %3 = bitcast [8 x i8]* %2 to i32* >>>>> %4 = load i...
2013 Oct 23
0
[LLVMdev] Extracting a value from an union
...set up from C like: std::array<union{int,float*}> arguments(5); The sequence of occurences of 'int' and 'float*' is encoded in a vector<llvm::Type*>: i32 i32 float* float* float* Right now I am trying this (this is the jitted function): define void @main([8 x i8]* %arg_ptr) { entrypoint: %0 = getelementptr [8 x i8]* %arg_ptr, i32 0 %1 = getelementptr [8 x i8]* %arg_ptr, i32 1 %2 = getelementptr [8 x i8]* %arg_ptr, i32 2 %3 = getelementptr [8 x i8]* %arg_ptr, i32 3 %4 = getelementptr [8 x i8]* %arg_ptr, i32 4 } First of all, is the functions' signa...
2013 Oct 28
0
[LLVMdev] Loop vectorizer dosen't find loop bounds
----- Original Message ----- > I am trying to vectorize the function > > void bar(float *c, float *a, float *b) > { > const int width = 256; > for (int i = 0 ; i < 256 ; ++i ) { > c[ i ] = a[ i ] + b[ i ]; > c[ width + i ] = a[ width + i ] + b[ width + i ]; > } > } > > using the following commands > > clang
2013 Oct 28
2
[LLVMdev] Loop vectorizer dosen't find loop bounds
I am trying to vectorize the function void bar(float *c, float *a, float *b) { const int width = 256; for (int i = 0 ; i < 256 ; ++i ) { c[ i ] = a[ i ] + b[ i ]; c[ width + i ] = a[ width + i ] + b[ width + i ]; } } using the following commands clang -emit-llvm -S loop.c opt loop.ll -O3 -debug-only=loop-vectorize -S -o - LV: Checking a loop in
2011 Jul 14
2
[LLVMdev] debug metadata incomplete for array arguments to functions?
Hello, Consider the following two functions: void foo(int* arg_ptr) { ... } void bar(int arg_arr[42]) { ... } ------ According to the C standard, both arguments will be passed to the function as pointers. However, in the debug information metadata generated in LLVM, it appears that they are also equivalent. More specifically, for both arg_ptr and arg_arr I get...
2013 Feb 20
3
[LLVMdev] Is va_arg correct on Mips backend?
I didn't have Mips board. I compile as the commands and check the asm output as below. 1. Question: The distance of caller arg[4] and arg[5] is 4 bytes. But the the callee get every arg[] by 8 bytes offset (arg_ptr1+8 or arg_ptr2+8). I assume the #BB#4 and #BB#5 are the arg_ptr which is the pointer to access the stack arguments. 2. Question: Stack memory 28($sp) has no initial value. If this memory address is a relocation record which set value by linker/loader, then it maybe is correct. clang -c ch8_3.cp...
2013 Feb 20
0
[LLVMdev] Is va_arg correct on Mips backend?
..., Jonathan <gamma_chen at yahoo.com.tw> wrote: > I didn't have Mips board. I compile as the commands and check the asm > output as below. > > 1. Question: > The distance of caller arg[4] and arg[5] is 4 bytes. But the the callee > get every > arg[] by 8 bytes offset (arg_ptr1+8 or arg_ptr2+8). I assume the #BB#4 > and #BB#5 are the arg_ptr which is the pointer to access the stack > arguments. > > 2. Question: > Stack memory 28($sp) has no initial value. If this memory address is a > relocation record which set value by linker/loader, then it maybe is...