similar to: [LLVMdev] line number of loop header

Displaying 20 results from an estimated 80000 matches similar to: "[LLVMdev] line number of loop header"

2018 May 15
2
source line number for instruction
Hi, I want to retrieve a function from a source line-number, is this something possible to achieve? I tried the following code snippet with LLVM-7 but it doesn't seem to workhttp://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend <http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend:> Is there specific documentation I can refer to implement this? Thanks -- *Rtr. PP
2010 Jul 07
2
[LLVMdev] source line number for instruction
Hi, I found the following at http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend: if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM instruction DILocation Loc(N); // DILocation is in DebugInfo.h unsigned Line = Loc.getLineNumber(); StringRef File = Loc.getFilename(); StringRef Dir = Loc.getDirectory(); } Does this also
2010 Jul 07
0
[LLVMdev] source line number for instruction
On Jul 6, 2010, at 10:44 PM, Guoliang Jin wrote: > I found the following at http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend > : > if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM > instruction > DILocation Loc(N); // DILocation is in > DebugInfo.h > unsigned Line = Loc.getLineNumber(); > StringRef
2006 Apr 08
2
[LLVMdev] line number information
Thanks for your help. I took a look at http://llvm.org/docs/SourceLevelDebugging.html and it seems like this doesn't give you much in the way of line number information. If you know what source line you are interested in then you can set a breakpoint, but suppose you want to know the line number in the source code for some arbitrary bytecode instruction. In my particular case, I have a pass
2018 May 15
0
source line number for instruction
Not sure what you tried/how it didn't work - could you explain more? You could scan through all the llvm::Functions in an llvm::Module and look at the debug info associated with them (getSubprogram) then check the location of that debug info. - Dave On Tue, May 15, 2018 at 12:46 AM Ridwan Shariffdeen via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Hi, > > I want to
2006 Apr 07
0
[LLVMdev] line number information
The debug intrinsics are intended for that. Please see: http://llvm.org/docs/SourceLevelDebugging.html for the details. Please note that this is being worked on actively Jim Laskey at Apple. He's working to get these intrinsics to generate DWARF output so that LLVM generated code can be used with a debugger. However, the intrinsics can be processed in whatever way you'd like via an LLVM
2006 Apr 07
3
[LLVMdev] line number information
Is there a way, using llvm, to relate LLVM instructions to the souce code statements (or line numbers) that they were generated from. So if compile some file test.c and get some binary test.bc can I relate statements in test.bc with source code line numbers in test.c and if so how would I go about doing that. Thanks for your time. - John -------------- next part -------------- An HTML attachment
2006 Apr 08
2
[LLVMdev] line number information
On Sat, 8 Apr 2006, Jim Laskey wrote: > If you look at the stoppoint calls you'll see that you can find the line > number and if you follow the compile unit argument on the call you will find > the file. The byte codes that follow the call would have been generated by > the code on that source line. I'd suggest an approach like this: Given an instruction in the a basic
2006 Apr 08
0
[LLVMdev] line number information
John, If you look at the stoppoint calls you'll see that you can find the line number and if you follow the compile unit argument on the call you will find the file. The byte codes that follow the call would have been generated by the code on that source line. -- Jim On Apr 8, 2006, at 5:33 AM, John Trimble wrote: > Thanks for your help. I took a look at http://llvm.org/docs/
2010 Apr 06
1
[LLVMdev] Get the loop trip count variable
Hi Eli, Could you tell me how to extract the variable name? The reason I want to do it at the IR level is because I have more information at this stage, such as, constant propagation and back edges. Cheers, Zheng On 5 April 2010 21:51, Eli Friedman <eli.friedman at gmail.com> wrote: > On Mon, Apr 5, 2010 at 1:19 PM, Zheng Wang <jason.wangz at gmail.com> wrote: >> Hello,
2010 Jul 07
1
[LLVMdev] source line number for instruction
On 7/7/2010 3:08 PM, Trevor Harmon wrote: > On Jul 6, 2010, at 10:44 PM, Guoliang Jin wrote: > >> I found the following at >> http://llvm.org/docs/SourceLevelDebugging.html#ccxx_frontend: >> if (MDNode *N = I->getMetadata("dbg")) { // Here I is an LLVM >> instruction >> DILocation Loc(N); // DILocation is in >>
2006 Apr 08
0
[LLVMdev] line number information
I get it now, I can't believe I didn't understand that before. Thank you all for your help! - John On 4/8/06, Chris Lattner <sabre at nondot.org> wrote: > > On Sat, 8 Apr 2006, Jim Laskey wrote: > > If you look at the stoppoint calls you'll see that you can find the line > > number and if you follow the compile unit argument on the call you will > find >
2015 Jul 02
2
[LLVMdev] input and output values from a loop
Hi there, I want to get input and output values from a loop. For this I am doing something like this: DominatorTree &DT = getAnalysis<DominatorTreeWrapperPass>().getDomTree(); CodeExtractor Extractor(DT, *L); Extractor.findInputsOutputs(inputs, outputs); When I print the input and output values for the following test code: void aFunc(void) { int sum=0;
2011 Oct 03
4
[LLVMdev] collect end line number for scope
Hi All,   int global; int func( int t) {    //scope 1   {      ....   } <-----   return x; }   For the above code, i want to collect endline (indicated by <---) for the scope. Can we get this information from the Dwarf Information in llvm 2.9 ?     Thanks & Regards, Pankaj -------------- next part -------------- An HTML attachment was scrubbed... URL:
2011 Oct 04
1
[LLVMdev] collect end line number for scope
Hi,   My problem definition is to collect "end line" for each scope (i.e. start and end line for a scope). I need to dump this information while emitting target code for an architecture. Though I understand that scoping details are not modeled in LLVM. Reference: http://llvm.org/docs/SourceLevelDebugging.html#format_common_lifetime   There are 2 classes I am referring, viz, DIScope and
2013 Feb 18
1
[LLVMdev] llvm line number of an instruction
Hello everybody, I want to get the line number of an instruction (and also of a variable declaration - alloca and global). The instruction is saved in an array of instructions. I have the function:     Constant* metadata::getLineNumber(Instruction* I){         if (MDNode *N = I->getMetadata("dbg")) { // this if is never executed             DILocation Loc(N);             unsigned
2006 Apr 09
1
[LLVMdev] line number information
Hi, I would like to know how much effect these stoppoint calls have on the optimization of the bytecode? DOes insertion of debugging info cause opportunities for optimization (especially interprocedural dead code elimination and interprocedural constant propogation) to be reduced? The -g code is not very readable, so I am not able to confirm this by my own experiment. Thanks! Nikhil On Sat,
2011 Oct 04
0
[LLVMdev] collect end line number for scope
Pankaj, On Oct 3, 2011, at 4:36 AM, Pankaj Gode wrote: > Hi All, > > int global; > int func( int t) > { > //scope 1 > { > .... > } <----- > return x; > } > > For the above code, i want to collect endline (indicated by <---) for the scope. Can we get this information from the Dwarf Information in llvm 2.9 ? > If there is no code
2011 Oct 05
2
[LLVMdev] collect end line number for scope
Hi,   The link and the information shared was helpful.   I will make my problem definition more clear. While I am "asm printing" target code, I also want to emit scope related information. Scope related information includes, - for each scope, start line, end line, start column, end column and - scope heirarchy. As scope is delimited by "{" and "}" (for an input
2010 Apr 21
2
[LLVMdev] determining the number of iteration of a loop
Hello I'm wandring to know how many times a block is executed inside a loop ? knowing that I can't use getSmallConstantTripCount() because the number is unkown "for (i=0;i<N;i++) for example" I'm using a Function pass for (Function::iterator BB = F.begin(), E = F.end(); BB != E; ++BB) { if (Loop *L = LI->getLoopFor(BB)) { if (L->getHeader() ==