similar to: [LLVMdev] Instrumenting virtual function calls

Displaying 20 results from an estimated 100 matches similar to: "[LLVMdev] Instrumenting virtual function calls"

2008 Feb 10
0
[LLVMdev] Instrumenting virtual function calls
On Feb 10, 2008, at 5:33 AM, Robert Zeh wrote: > I'm attempting to instrument virtual function calls in my code. > After each virtual call I'm calling my own registerMethod function, > with an integer marking the location of the call and a pointer to > the function that was called. > > However, and this is where I get confused, the function pointer >
2008 Feb 13
5
[LLVMdev] Instrumenting virtual function calls
After hacking away at it for a bit, it looks like the mystery function is actually a stub function. The function pointer is coming from a vtable, which gets filled in with pointers to stub functions. Is there any way to do the round trip for a stub function? Two possible solutions come to mind: 1) Modify getGlobalValueAtAddress to work for pointers to stub functions 2) Add a
2008 Feb 13
0
[LLVMdev] Instrumenting virtual function calls
On Feb 12, 2008, at 5:08 PM, Robert Zeh wrote: > After hacking away at it for a bit, it looks like the mystery > function is actually a stub function. You know, I had this lengthy email written to cover all the details and I decided not to send it as I wasn't sure if that was what you were hitting a stub and I didn't want to confuse the issue if it wasn't due to stubs...
2009 Jan 19
1
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
Andrew Haley <aph at redhat.com> writes: > Óscar Fuentes wrote: >> The following message is a courtesy copy of an article >> that has been posted to gmane.comp.compilers.llvm.devel as well. >> >> Andrew Haley <aph at redhat.com> writes: >> >>> This is x86_64. I have a problem where an absolute memory load >>> >>> define
2009 Jan 21
0
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
Óscar Fuentes wrote: > Andrew Haley <aph at redhat.com> writes: > >> Óscar Fuentes wrote: >>> The following message is a courtesy copy of an article >>> that has been posted to gmane.comp.compilers.llvm.devel as well. >>> >>> Andrew Haley <aph at redhat.com> writes: >>> >>>> This is x86_64. I have a problem where an
2008 Feb 13
0
[LLVMdev] Instrumenting virtual function calls
On Feb 12, 2008, at 5:08 PM, Robert Zeh wrote: > After hacking away at it for a bit, it looks like the mystery function > is actually a stub function. The function pointer is coming from a > vtable, which gets filled in with pointers to stub functions. > > Is there any way to do the round trip for a stub function? Two > possible solutions come to mind: > 1) Modify
2008 Jun 19
1
[LLVMdev] Constant function pointers and inlining
Hello, I've been working on turning PHP scripts into LLVM IR and I've gotten to the stage where I'm able to construct LLVM code that calls the PHP opcode handlers that I've pre-compiled to LLVM IR in the correct order. However, the PHP API is designed so that the handlers are not globally accessible (qualified by "static" in the C source). Instead they're supposed to
2009 Jan 19
6
[LLVMdev] Load from abs address generated bad code on LLVM 2.4
This is x86_64. I have a problem where an absolute memory load define i32 @foo() { entry: %0 = load i32* inttoptr (i64 12704196 to i32*) ; <i32> [#uses=1] ret i32 %0 } generates incorrect code on LLVM 2.4: 0x7ffff6d54010: mov 0xc1d9c4(%rip),%eax # 0x7ffff79719da 0x7ffff6d54016: retq should be 0x7ffff6d54010: mov 0xc1d9c4, %eax 0x7ffff6d54016: retq
2013 Oct 02
1
[LLVMdev] ScalarEvolution::createNodeForPHI
----- Original Message ----- > > On Oct 1, 2013, at 6:45 AM, Michele Scandale > <michele.scandale at gmail.com> wrote: > > > Hello to everybody, > > > > I'm working on some improvements on trip count computation with > > ScalarEvolution > > analysis. > > Considering the following test > > > >
2013 Oct 01
3
[LLVMdev] ScalarEvolution::createNodeForPHI
Hello to everybody, I'm working on some improvements on trip count computation with ScalarEvolution analysis. Considering the following test ;----------------------------------------------------------------------------; define void @foo(i32 %a, i32 %b, i32 %s) #0 { entry: %cmp = icmp sgt i32 %s, 0 %cmp15 = icmp sgt i32 %a, %b %or.cond = and i1 %cmp, %cmp15 br i1 %or.cond, label
2013 Oct 02
0
[LLVMdev] ScalarEvolution::createNodeForPHI
On Oct 1, 2013, at 6:45 AM, Michele Scandale <michele.scandale at gmail.com> wrote: > Hello to everybody, > > I'm working on some improvements on trip count computation with ScalarEvolution > analysis. > Considering the following test > > ;----------------------------------------------------------------------------; > define void @foo(i32 %a, i32 %b, i32 %s) #0
2015 Sep 14
2
JIT: Mapping global variable in JIT'ted code to variable in running program
Hi, I think this is probably easiest to explain with code (I only provided the essentials for clarity): // begin file jit.cpp int myglobal; void printMyGlobal() { printf("myglobal: %d\n", myglobal); } int main(int argc, char *argv[]) { // This file, jit.cpp has been compiled to bitcode (clang -S -emit-llvm jit.cpp) // and is read into Module M here Module *M = ...
2010 Jul 05
0
[LLVMdev] how to have a Operator reference from an Instruction?
Hi All, I'm new to LLVM and trying to do some analysis on the IR. For a instruction, e.g., a BinaryOperator, can I have the reference of an Operator from it? Now I can use getOpcode() or getOpcodeName() to have unsigned int or string. But can I have a Operator or specifically AddOperator as the return value? Thanks. Regards, --Wenbin -------------- next part -------------- An HTML
2017 Oct 25
2
[PATCH/RFC] Modifying reassociate for improved CSE: fairly large perf gains
When playing around with reassociate I noticed a seemingly obvious optimization that was not getting done anywhere in llvm… nor in gcc or ICC. Consider the following trivial function: void foo(int a, int b, int c, int d, int e, int *res) { res[0] = (e * a) * d; res[1] = (e * b) * d; res[2] = (e * c) * d; } This function can be optimized down to 4 multiplies instead of 6 by reassociating
2008 Jan 12
1
[LLVMdev] Labels
I'm attempting to modify a parser generator to emit LLVM code instead of C. So far the experience has been trivial, but I am now running into an error regarding labels that I can't seem to solve. Situation 1: A label is used immediately after a void function call (l6 in this case): <snip> %tmp26 = load i32* @yybegin, align 4 %tmp27 = load i32* @yyend, align 4 call void
2018 Jan 03
0
instrumenting read and write
Hello Everyone, I am trying to do what has been done for tsan. So, there is a run time library “tsan" to detect races. There is a llvm pass to instrument read and write in c program and call functions in run time library. I have all three things with me, but I don’t know how should I link all these three together. Basically I want to know how to implement same functionality as given below
2012 Jul 31
1
[LLVMdev] Instrumenting all va_arg invocations
Hi, I'm looking for a way to add instrumentation that handles all function arguments, one by one. With variable argument lists, this can only be done at the place of va_arg() call. Unfortunately, Clang lowers va_arg into platform-specific code in the frontend, and I can't find a good, reliable way to figure it out in our LLVM pass. I've tried adding a special case of TBAA info to the
2012 Dec 25
0
[LLVMdev] About instrumenting/rewriting X86 instructions
Hi all, I plan to use LLVM to instrument/rewrite X86 instructions during the compilation of a program. For example, insert checking target instructions before jmp instructions, or rewrite a instruction to prevent code using a specific register. I think the work should be done at the CodeGen phase, but I'm not quite clear how can I start. Can anyone give me some suggestions? Thanks very
2012 Dec 25
0
[LLVMdev] About instrumenting/rewriting X86 instructions
Hi all, I plan to use LLVM to instrument/rewrite X86 instructions during the compilation of a program. For example, insert checking target instructions before jmp instructions, or rewrite a instruction to prevent code using a specific register. I think the work should be done at the CodeGen phase, but I'm not quite clear how can I start. Can anyone give me some suggestion? Thanks very much,
2012 Dec 25
2
[LLVMdev] About instrumenting/rewriting X86 instructions
Hi all, I plan to use LLVM to instrument/rewrite X86 instructions during the compilation of a program. For example, insert checking target instructions before jmp instructions, or rewrite a instruction to prevent code using a specific register. I think the work should be done at the CodeGen phase, but I'm not quite clear how can I start. Can anyone give me some suggestion? Thanks very