similar to: [LLVMdev] Insert a function call in the code

Displaying 20 results from an estimated 500 matches similar to: "[LLVMdev] Insert a function call in the code"

2011 Nov 20
0
[LLVMdev] Insert a function call in the code
Thank you for your help I found the problem, as hook() is a no paramter function,so for(Function::arg_iterator i = hook->arg_begin(), e = hook->arg_end(); i != e; ++i) { Args.push_back(i); /////////////Wong } we can add a call by Instruction *newInst = CallInst::Create(hook,
2011 Nov 21
0
[LLVMdev] How to get ELF section virtual starting address from MCSymbolRefExpr?
Yeh, I eventually figured that out. Thanks for responding though. Jack ________________________________________ From: llvmdev-bounces at cs.uiuc.edu [llvmdev-bounces at cs.uiuc.edu] on behalf of llvmdev-request at cs.uiuc.edu [llvmdev-request at cs.uiuc.edu] Sent: Sunday, November 20, 2011 10:00 AM To: llvmdev at cs.uiuc.edu Subject: LLVMdev Digest, Vol 89, Issue 47 Send LLVMdev mailing list
2013 Jan 16
2
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi Alastair, Thank you so much for the information on the tools. Actually, I need to analyze which sections of code are prone to misses and mis predicts, and would have to eventually instrument the code. I was able to instrument and call an external function, but faced an issue while passing an argument to the function. I am following EdgeProfiling.cpp but couldn't figure out the problem.
2012 Aug 22
1
[LLVMdev] Insert Self Written Function Call from a FunctionPass?
Hello all; So my goal is to insert some (self-written) function calls in the LLVM IR. I can achieve it with a ModulePass and using the getOrInsertFunction() call. For a ModulePass I follow the steps- 1. Compile the code (in which call instructions are to be inserted) to LLVM IR 2. Compile the file (which contains the *called* external function ) to LLVM IR 3. Link them together and run the
2013 Jan 27
1
[LLVMdev] Passing an array to an external function
Hi, I tried passing the array directly using and changing the getorInsertFunction accordingly but this didn't work. It fails with Assertion `(i >= FTy->getNumParams() || FTy->getParamType(i) == Args[i]->getType()) && "Calling a function with a bad signature!"' failed. hookFunc = M.getOrInsertFunction("hook", Type::getVoidTy(M.getContext()),
2013 Jan 15
0
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi Silky, On 14/01/13 01:47, Silky Arora wrote: > I need to profile the code for branches (branch mis predicts > simulation), load/store instructions (for cache hits/miss rate), and a > couple of other things and therefore, would need to instrument the code. > However, I would like to know if writing the output to a file would > increase the execution time, or is it the profiling
2013 Jan 14
2
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi, @Alastair: Thanks a bunch for explaining this so well. I was able to write a simple profiler, and run it. I need to profile the code for branches (branch mis predicts simulation), load/store instructions (for cache hits/miss rate), and a couple of other things and therefore, would need to instrument the code. However, I would like to know if writing the output to a file would increase the
2013 Jan 20
0
[LLVMdev] Dynamic Profiling - Instrumentation basic query
Hi Silky, Sorry for the slow reply. You probably already fixed this, but just in case I'll reply anyway. Comments inline below On 15/01/13 19:38, SArora wrote: > Hi Alastair, > Thank you so much for the information on the tools. Actually, I need to > analyze which sections of code are prone to misses and mis predicts, and > would have to eventually instrument the code. >
2013 Jan 27
2
[LLVMdev] Passing an array to an external function
Hi all, I am new to LLVM, and I am learning how to use LLVM for profiling. I need to pass an array to an external method, and insert a call instruction to the method in the code. After reading a few source files, I've tried using GetElementPtrInst to pass an array, but it fails at llvm::GetElementPtrInst::hasAllZeroIndices() const + 0 std::vector<Value*> Args(1);
2013 Jan 27
0
[LLVMdev] Passing an array to an external function
On Jan 26, 2013, at 19:24 , SArora <silkyar at umich.edu> wrote: > Hi all, > > I am new to LLVM, and I am learning how to use LLVM for profiling. I need to > pass an array to an external method, and insert a call instruction to the > method in the code. > > After reading a few source files, I've tried using GetElementPtrInst to pass > an array, but it fails at
2013 Sep 05
0
[LLVMdev] Fix crash in llvm_gcda_emit_arcs()
Hi Nick and Bill, Attached is a new version of the patch that checks against cur_buffer_size. This works with the cases I've been using but again I haven't run the official tests on this change. Thanks, Joseph Kain On Thu, Sep 5, 2013 at 9:46 AM, Joseph Kain <joekain at gmail.com> wrote: > Hi Nick, > > Thanks for looking over my patch. I'd be happy to add the
2008 Jul 10
2
[PATCH] tripplite driver updates
The tripplite driver was developed on a machine with a reliable serial connection, and inherited the assumption that the serial line connection would not drop, reorder, or fail character read and writes. This patch adds significantly improved failure mode handling and also does basic checks of data validity. There's also a few minor cleanups/beautification. I've tested this code on my
2013 Sep 05
2
[LLVMdev] Fix crash in llvm_gcda_emit_arcs()
Hi Nick, Thanks for looking over my patch. I'd be happy to add the compare against cur_buffer_size. I'll try to write up such a change today and then send a new patch to the list. Joseph Kain On Thu, Sep 5, 2013 at 1:37 AM, Nick Lewycky <nicholas at mxc.ca> wrote: > Bill, could you take a look at this? I don't have a checkout of > compiler-rt that builds. > >
2013 Sep 05
0
[LLVMdev] Fix crash in llvm_gcda_emit_arcs()
Bill, could you take a look at this? I don't have a checkout of compiler-rt that builds. It seems obviously-correct to me, but I wish it did a compare against cur_buffer_size to make sure it's in range. Nick Joseph Kain wrote: > Hi, > > I've been seeing a crash in llvm_gcda_emit_arcs() on x86_64. The crash > occurs executing a movdqa instruction with an unaligned src
2018 Jan 15
2
Avoiding uid conflicts between rfc2307 user/groups and computers
> -----Oorspronkelijk bericht----- > Van: samba [mailto:samba-bounces at lists.samba.org] Namens > Marco Gaiarin via samba > Verzonden: maandag 15 januari 2018 13:03 > Aan: samba at lists.samba.org > Onderwerp: Re: [Samba] Avoiding uid conflicts between rfc2307 > user/groups and computers > > Mandi! Rowland Penny via samba > In chel di` si favelave... > >
2010 Nov 23
2
[LLVMdev] how to get a void type value in llvm
Hi, I want to insert a function with a void type parameter, for example: int foo(void); OI declared fcall2 = M.getOrInsertFunction("foo", IntegerType::get(M.getContext(), 32), Type::getVoidTy(M.getContext())); then the question is how to get the void type value to make the CallInst inserted sucessfully? (what should be ********) CallInst::Create(fcall2, ******,
2018 Jan 15
0
Avoiding uid conflicts between rfc2307 user/groups and computers
Mandi! L.P.H. van Belle via samba In chel di` si favelave... > > It is not the SYSTEM user (that is a local user to the workstation, so > > clearly does not exist on the domain). > Yes it does. Look at "Builtin\system" which is also "NT Authority\System. Ahem, clearly every machine (workstation, server; i suppose also the domain) have a SYSTEM account, but they
2013 Aug 30
2
[LLVMdev] Fix crash in llvm_gcda_emit_arcs()
Hi, I've been seeing a crash in llvm_gcda_emit_arcs() on x86_64. The crash occurs executing a movdqa instruction with an unaligned src address. The attached patch to the compiler-rt project fixes the problem by using memcpy() to read data from the write_buffer[] in GCDAProfiling.c. This is my first patch submission to llvm so please let me know if I've missed any steps. I'm not on
2011 Nov 20
1
[LLVMdev] call different function while running
Hello every, I am new to LLVM, using it to create a system Now I have a problem code below: int main(int argc, char **argv) { symbolic(2);//symbolic(int a) sleep(1,2);//sleep(int a, int b) } two definations of sleep int sleep(int a, int b) { return a+b; } int sleep(int a, int b) { return a-b; } can I choose different sleep() by the result of symbolic(), if symbolic(5)
2013 Apr 16
1
[LLVMdev] creating and inserting a function with variable arguments
The code that I have written to get the function type is: const std::vector<Type *> ParamTys; ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(IntegerType::getInt32Ty(Context)); ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0)); ParamTys.push_back(PointerType::get(Type::getVoidTy(Context), 0));