search for: functionb

Displaying 7 results from an estimated 7 matches for "functionb".

Did you mean: function
2010 Feb 05
1
unique function works funny
I have 3 nested functions, the core function goes like this: listx<-function(x,tox) { xt=table(x) wa=sort(unique(x,fromLast=FALSE)) print(xt) print(wa) ...... return(kk) } listx get called in functionB, and functionB get called in functionC. When I test functionB, the listx function works just fine. When I call functionB from functionC, strange thing happened: My result for xt: 0.07 0.17 0.2 1 1 6 My result for wa: 0.07 0.17 0.20 0.20 (my data obviously is 0.2 repeated 8 times, 1 0...
2018 Mar 22
0
Change args count in CallInstr
Hello, I have a CallInstr for "functionA". I renamed it to "functionB" but I want to decrease number of arguments as functionA accepts e.g two and functionB just one. So far, I dont find any function to just replace args / set args size. Any idea? Maybe other solution... Is there any way to create a new CallInstr for functionB, copy things from CallInstr of f...
2010 Jan 30
0
[LLVMdev] Redefining function
...e2 will be magically replaced with the non-weak print in File3. > //swap the definition of the function "print" from the one in File2.c > to File3.c > swap (file1, file2, file3); If all the functions are in the same module, then you can use FunctionA->replaceAllUsesWith(FunctionB) if they have the same type. Ciao, Duncan.
2010 Jan 29
2
[LLVMdev] Redefining function
Hi everybody. I've just started learning about LLVM and didn't get too far studying the core. I couldn't find the solution to my problem (if it has one) in the mailing list or the source code. The problem is: how can I redefine a function that's been called already by some other function? Suppose I have 3 files, all compiled to bytecode through llvm-gcc (I think it could be clang
2011 Jul 08
0
[LLVMdev] Inter-module calls
...lInst across the boundary fails verification. Calling it as an external function fails to resolve, even if both ModuleA and ModuleB are in the same ExecutionEngine. I can think of two ways around this: 1. Create a constant function pointer in ModuleA using the value from EE.getPointerToFunction(FunctionB). This seems trivial, but I am concerned it will prevent many optimizations. 2. Copy functions from ModuleB into ModuleA. This appears to be a non-trivial operation. I could use Linker::LinkModules(ModuleA, ModuleB), but it seems rather inefficient to clone an entire module just to get at one...
2011 Jul 08
0
[LLVMdev] Inter-module calls
...lInst across the boundary fails verification. Calling it as an external function fails to resolve, even if both ModuleA and ModuleB are in the same ExecutionEngine. I can think of two ways around this: 1. Create a constant function pointer in ModuleA using the value from EE.getPointerToFunction(FunctionB). This seems trivial, but I am concerned it will prevent many optimizations. 2. Copy functions from ModuleB into ModuleA. This appears to be a non-trivial operation. I could use Linker::LinkModules(ModuleA, ModuleB), but it seems rather inefficient to clone an entire module just to get at one...
2010 Jan 30
2
[LLVMdev] Redefining function
...supported for ELF and a.out. Maybe not the better solution. //swap the definition of the function "print" from the one in File2.c to > File3.c > swap (file1, file2, file3); > If all the functions are in the same module, then you can use > FunctionA->replaceAllUsesWith(FunctionB) if they have the same > type. > Sorry I didn't see that function before. But, when I tried that (pastebin code: http://pastebin.com/m2485ae4f), it still doesn't print as supposed. It calls only the first function printing File2.c File2.c Maybe that works when the functions haven...