search for: luzhao

Displaying 13 results from an estimated 13 matches for "luzhao".

2013 Nov 02
4
[LLVMdev] get function local debug info?
Hi, If I have an instance of DISubprogram, can I get the debug info of local variables of the function, including parameters? I tried to use the getVariables() function defined in DISubprogram, but it seemed to return an empty DIArray node when I ran my pass alone using opt. Do I need to enable any other analysis passes in order to populate the data? My related snippet of code is like the
2013 Nov 03
0
[LLVMdev] get function local debug info?
...t;David Blaikie" <dblaikie at gmail.com> wrote: > You're welcome to provide a patch or I might get to it myself. Also this > should be described in http://llvm.org/docs/SourceLevelDebugging.html if > it isn't already > On Nov 3, 2013 12:11 AM, "lu zhao" <luzhao at cs.utah.edu> wrote: > >> Hi David, >> >> Thank you! Your suggested method works. >> >> I think that you or someone should write what you said in the comments >> for the getVariable() function. :) >> >> Best, >> Lu >> >> On...
2013 Nov 03
0
[LLVMdev] get function local debug info?
On Sat, Nov 2, 2013 at 4:17 PM, lu zhao <luzhao at cs.utah.edu> wrote: > Hi, > > If I have an instance of DISubprogram, can I get the debug info of local > variables of the function, including parameters? > > I tried to use the getVariables() function defined in DISubprogram, but it > seemed to return an empty DIArray n...
2008 Mar 31
0
[LLVMdev] Pass registered multiple times!
...It does not have puts and __main as shown in this page: http://llvm.org/docs/WritingAnLLVMPass.html#running So I guess the drived FunctionPass only works on the application functions, not on the library functions of LLVM. Is that right? Thanks. Lu On Mon, 31 Mar 2008 00:47:26 -0600 Lu Zhao <luzhao at cs.utah.edu> wrote: > Hi, > > I'm writing my first hello world Pass with the class name First, but > when I tried to load it using opt, I got the following error: > > /var/soft/llvm-2.2-build/lib/Transforms/Hello$ opt > -load ../../../Debug/lib/First.so --help >...
2008 Mar 31
2
[LLVMdev] Pass registered multiple times!
Hi, I'm writing my first hello world Pass with the class name First, but when I tried to load it using opt, I got the following error: /var/soft/llvm-2.2-build/lib/Transforms/Hello$ opt -load ../../../Debug/lib/First.so --help opt: /var/soft/llvm-2.2/lib/VMCore/Pass.cpp:157: void<unnamed>::PassRegistrar::RegisterPass(llvm::PassInfo&): Assertion `Inserted && "Pass
2008 Mar 31
2
[LLVMdev] Pass registered multiple times!
...f you disassemble your input bytecode file and look at the LLVM disassembly, I'd bet that either __main() and puts are external functions with no function body or are not present in the file at all. -- John T. > Thanks. > Lu > > On Mon, 31 Mar 2008 00:47:26 -0600 > Lu Zhao <luzhao at cs.utah.edu> wrote: > >
2011 Jul 23
1
[LLVMdev] getFunction() of DISubprogram return 0?
Hi, I'd like to get the Function* that is described by a DISubprogram. I found this method getFunction() in the class. However, when I use it in my code, the function always returns 0. I tried to dig into it and saw that a mysterious number 16 is used in getFunctionField(16). I'm wondering if my failure of the function was caused by my incorrect use, e.g., without fulfilling
2008 Apr 14
1
[LLVMdev] viewing CFG in debugging
Hi, I tried to view the CFG when debugging a pass by "gdb opt," but the gdb does not have DAG.viewGraph function, which is indicated at http://www.llvm.org/docs/ProgrammersManual.html#ViewGraph. Could anyone tell me how to make DAG* functions available in gdb? Thanks in advance. Lu
2008 Apr 14
2
[LLVMdev] standard passes
I'd like to hack into the standard passes when using the command line option -std-compile-opts. What I'd like to do is to stop after each pass and see the current program representation before the next pass is run in gdb. What is the favorite way to do this? Lu
2008 Mar 31
0
[LLVMdev] Pass registered multiple times!
> If you disassemble your input bytecode file and look at the LLVM > disassembly, I'd bet that either __main() and puts are external > functions with no function body or are not present in the file at all. You're right. The assembly code only has the body of main function and the external function declaration puts declare i32 @puts(i8*) It makes sense, I think, that my
2008 Apr 14
2
[LLVMdev] standard passes
> If you're running opt on the command line directly, then use the > "-p" option. See "-help" for more information on that. > > -bw > I have a couple of more questions. 1. Does -std-compile-opts of opt do the same optimization with llvm-gcc with -O[1-3] options? If I want to debug into passes through llvm-gcc, how do I set a breakpoint right before pass
2008 Apr 21
2
[LLVMdev] newbie question for type comparison
Hi, I want to extract all instruction of the form "alloca %struct.S", where $struct.S is defined as a struct %struct.S = type { i32, i32 } I'm using the following loop: for(inst_iterator i = inst_begin(F), e = inst_end(F); i!= e; i++) { AllocaInst* ai; if( (ai = dyn_cast<AllocaInst>(&*i))){ if(ai->getOperand(0)->getType()->getTypeID() ==
2008 Apr 21
3
[LLVMdev] newbie question for type comparison
Hi John, Thank you a lot. That clarifies some my confusions. What I want to do is to use both methods, get ALL struct allocation and a SPECIFIC struct allocation, at different situations. Here, I've got a couple of more questions. 1. For getting ALL struct allocation, when I use if( (AI = dyn_cast<AllocaInst>(&*i)))