search for: test_func

Displaying 20 results from an estimated 20 matches for "test_func".

2007 Sep 04
1
Variable scope in a function
...se in advance for this question; I'm sure it is answered in the documentation or this mailing list many times, however the answer has eluded me. I'm trying to write a function where I don't want external variables to be scoped in from the parent environment. Given this function: test_func = function() { if (exists("kat") == FALSE) { print("kat is undefined") } else { print(kat) } } If I did this: > kat = 12 > test_func() I'd like the result to be the error, but now it's 12 (which is of course correct according to the documentation)....
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...uleID = 'test_load_lib.c' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" target triple = "i686-pc-mingw32" declare i32 @a_outside_func(i32) define i32 @test_func() { entry: %call = call i32 @a_outside_func(i32 15) ret i32 %call } where a_outside_func is a function defined on my code: extern "C" int a_outside_func(int a) { return a + 50; } and following code is to get MCJIT work: #define prt(x) if(x) { cout << x << endl; } LLV...
2010 Mar 15
2
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...ckaddress(@test_fun, %test_label) > } > > define i32 @test_fun() nounwind { > entry: > ret i32 -1 > test_label: > br label %ret > ret: > ret i32 -1 > } > > The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim & CodeGenPrepare) zap dead blocks, so test_label was being deleted. I'm not sure I understand completely. We should be able to rely on the indirectbr label arguments to identify blocks that are live. You c...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...> "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" > > target triple = "i686-pc-mingw32" > > > > declare i32 @a_outside_func(i32) > > > > define i32 @test_func() { > > entry: > > %call = call i32 @a_outside_func(i32 15) > > ret i32 %call > > } > > > > where a_outside_func is a function defined on my code: > > > > extern "C" int a_outside_func(int a) > > { > > return a + 50; > &...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...;> >> define i32 @test_fun() nounwind { >> entry: >> ret i32 -1 >> test_label: >> br label %ret >> ret: >> ret i32 -1 >> } >> >> The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim & CodeGenPrepare) zap dead blocks, so test_label was being deleted. > > I'm not sure I understand completely. We should be able to rely on the indirectbr label arguments to identify blocks that are li...
2014 Apr 04
2
[LLVMdev] Weird problems on calling an external function from MCJIT on Windows(mingw)
...:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f80:128:128-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32-S32" > >> > target triple = "i686-pc-mingw32" > >> > > >> > declare i32 @a_outside_func(i32) > >> > > >> > define i32 @test_func() { > >> > entry: > >> > %call = call i32 @a_outside_func(i32 15) > >> > ret i32 %call > >> > } > >> > > >> > where a_outside_func is a function defined on my code: > >> > > >> > extern "C"...
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...ckaddress(@test_fun, %test_label) > } > > define i32 @test_fun() nounwind { > entry: > ret i32 -1 > test_label: > br label %ret > ret: > ret i32 -1 > } > > The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim & CodeGenPrepare) zap dead blocks, so test_label was being deleted. > > The code generator doesn't want dead blocks coming into it for various reasons, so removing them is important. I guess we'll...
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...estcase: define i8* @test1() nounwind { entry: ret i8* blockaddress(@test_fun, %test_label) } define i32 @test_fun() nounwind { entry: ret i32 -1 test_label: br label %ret ret: ret i32 -1 } The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim & CodeGenPrepare) zap dead blocks, so test_label was being deleted. The code generator doesn't want dead blocks coming into it for various reasons, so removing them is important. I guess we'll have to d...
2010 Mar 15
3
[LLVMdev] LLVM tries to remove labels used in blockaddress()
Hi, i ran into a problem when using blockaddress() with a label in another function. It seems to me that LLVM tries to remove the label used in blockaddress because it seems like it is not used, but in fact it may be used somewhere with a indirectbr. I attached a small test-case that produces this error. (The original problem is much more complicated, so i hope the reduced example, which has no
2010 Mar 15
0
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...;> >> define i32 @test_fun() nounwind { >> entry: >> ret i32 -1 >> test_label: >> br label %ret >> ret: >> ret i32 -1 >> } >> >> The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim & CodeGenPrepare) zap dead blocks, so test_label was being deleted. >> >> The code generator doesn't want dead blocks coming into it for various reasons, so removing them is important. I guess w...
2010 Mar 15
1
[LLVMdev] LLVM tries to remove labels used in blockaddress()
...nd { > >> entry: > >> ret i32 -1 > >> test_label: > >> br label %ret > >> ret: > >> ret i32 -1 > >> } > >> > >> The basic problem is that we codegen test1, which generates a reference to test_label, then we codegen test_func. The optimization passes that run before the code generator (UnreachableBlockElim & CodeGenPrepare) zap dead blocks, so test_label was being deleted. > >> > >> The code generator doesn't want dead blocks coming into it for various reasons, so removing them is important....
2015 Aug 05
2
[LLVMdev] Cc llvmdev: Re: llvm bpf debug info. Re: [RFC PATCH v4 3/3] bpf: Introduce function for outputing data to perf event
...gt;>> struct my_str __str_my_str; >>>> >>>> struct my_str2 { >>>> int x; >>>> int y; >>>> int z; >>>> }; >>>> struct my_str2 __str_my_str2; >>>> >>>> test_func(__builtin_bpf_typeid(&__str_my_str)); >>>> test_func(__builtin_bpf_typeid(&__str_my_str2)); >>>> mov r1, 1 >>>> call 4660 >>>> mov r1, 2 >>>> call 4660 >>> >>> thi...
2007 Jul 14
1
REnouveau crashed my computer
Hi, When REnouveau came to "74/75 test_interesting_registers" the CPU used 100% and I could only use the mouse, but not interact witt anything. What could be wrong? I am using GeForce 6150 and Fedora 7. Love, Louise
2007 Apr 18
1
[Bridge] bridge at start up
...son > > as exhibited by this simple test: > > > > struct sk_buff { > > int foo; > > }; > > > > int invoke(struct sk_buff *skb, int (*okfn)(struct sk_buff *)) > > { > > return okfn(skb); > > } > > > > extern int test_func(struct sk_buff *); > > > > int invoke2(struct sk_buff *skb) > > { > > return test_func(skb); > > } > > > > In the generated asm on sparc64, invoke2() gets a tail-call > > whereas invoke() does not. Hmmm... > > Pasha (<snort2004...
2015 Oct 22
2
add intrinsic function support for customized backend
...tried the pattern matching first, however, the intrinsic function is matching with a normal function call. For example, I have the following IR, which contains intrinsic function "foo": ***************************************************************************************** *define i32 @test_func() {* *EntryBlock:* * %0 = call i32 @llvm.foo.i32.i32(i32 2, i32 3)* * ret i32 %0* *}* *declare i32 @llvm.foo.i32.i32(i32, i32)* ******************************************************************************************* In InstroInfo.td, I define a pseudo instruction like this : ****************...
2007 Apr 18
3
[Bridge] Re: do_IRQ: stack overflow: 872..
On Fri, 07 Jan 2005 17:05:59 +0000 David Woodhouse <dwmw2@infradead.org> wrote: > On Sat, 2004-12-18 at 08:50 +0100, Andi Kleen wrote: > > It's not really an oops, just a warning that stack space got quiet > > tight. > > > > The problem seems to be that the br netfilter code is nesting far too > > deeply and recursing several times. Looks like a design
2020 Jul 26
2
[LAA] RtCheck on pointers of different address spaces.
...tions) using these pointers in the loop. (extracted only the relevant instructions): ---------------------------------------------------------------------------------------------------------------------------------------------------------- define protected amdgpu_kernel void @test_func(i32 %arg1, i32 %arg2) { entry: %arrayidx274 = getelementptr inbounds [4000 x float], [4000 x float] addrspace(3)* @Obj2, i32 0, i32 %arg1 --------- br i1 %cmp1, label %header, label %for.end header: % struct_var2.ld = load %struct_var2*, %struct_var2* addrspace(4)* ge...
2015 Oct 22
2
add intrinsic function support for customized backend
Hi, All, I want to add one intrinsic function for my particular backend. Let's say the intrinsic function is named "foo" which takes two i32 inputs and has one i32 output. First, I add this line "def int_foo : Intrinsic<[llvm_i32_ty], [llvm_i32_ty, llvm_i32_ty], [IntrReadArgMem]>;" in /include/llvm/IR/Intrinsics.td. Then, in my target/InstrInfo.td, I'm supposed
2020 Jul 26
2
[LAA] RtCheck on pointers of different address spaces.
...tions) using these pointers in the loop. (extracted only the relevant instructions): ---------------------------------------------------------------------------------------------------------------------------------------------------------- define protected amdgpu_kernel void @test_func(i32 %arg1, i32 %arg2) { entry: %arrayidx274 = getelementptr inbounds [4000 x float], [4000 x float] addrspace(3)* @Obj2, i32 0, i32 %arg1 --------- br i1 %cmp1, label %header, label %for.end header: % struct_var2.ld = load %struct_var2*, %struct_var2* addrspace(4)* ge...
2010 May 28
8
form helpers don't seem to work with RJS files...
...l require fields_for though. And that’s where the problem lies. ActionView::TemplateError (undefined method `fields_for'' for "#<ActionView::Helpers::FormBuilder:0x944ea28>":String) on line #3 of app/views/trials/observe.rjs: 1: page.alert(''before'') 2: test_func = pluralize(6, ''cat'') 3: @form.fields_for :org_detail do |w| 4: page[''section_two''].replace_html :partial => "mypartial", :locals => { :f => w } 5: end 6: page.alert(''after'') As you can see, the pluralize method seem...