similar to: [LLVMdev] Source code annotations on loops

Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Source code annotations on loops"

2010 May 07
0
[LLVMdev] getTripCount requires which optimization passes?
hi, On Fri, May 7, 2010 at 8:59 AM, Trevor Harmon <Trevor.W.Harmon at nasa.gov>wrote: > Hi, > > For me, getTripCount always returns null, even for trivial loops such > as: > > void simple(int j) { > for (int i = 0; i < 10; i++) { > j++; > } > } > > Looking through the mailing list archive, it appears that getTripCount > requires
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
Hi, For me, getTripCount always returns null, even for trivial loops such as: void simple(int j) { for (int i = 0; i < 10; i++) { j++; } } Looking through the mailing list archive, it appears that getTripCount requires certain optimization passes to run first, but it's not clear which ones. There doesn't seem to be any documentation on this. Does anybody
2010 May 07
2
[LLVMdev] getTripCount requires which optimization passes?
On May 6, 2010, at 6:32 PM, ether zhhb wrote: > As the comment said: > /// The IndVarSimplify pass transforms loops to have a form that > this > /// function easily understands. > > you could try -indvars. After adding -indvars to the opt command, getTripCount still returns null. I suppose it's possible, depending on the scheduling of the pass manager, that
2010 May 10
0
[LLVMdev] getTripCount requires which optimization passes?
On May 7, 2010, at 11:17 AM, Trevor Harmon wrote: > On May 6, 2010, at 6:32 PM, ether zhhb wrote: > >> As the comment said: >> /// The IndVarSimplify pass transforms loops to have a form that >> this >> /// function easily understands. >> >> you could try -indvars. > > After adding -indvars to the opt command, getTripCount still returns
2010 Feb 09
0
[LLVMdev] Mapping bitcode to source code
On Feb 9, 2010, at 11:13 AM, Trevor Harmon wrote: > Is there any information about these changes and why they were > necessary? I think I found it: http://nondot.org/~sabre/LLVMNotes/EmbeddedMetadata.txt Still looking for an API to access the metadata... Trevor
2010 Feb 09
3
[LLVMdev] Mapping bitcode to source code
On Feb 8, 2010, at 8:51 PM, Duncan Sands wrote: > this can be done using debug info. Check out > http://llvm.org/docs/SourceLevelDebugging.html Wow, that threw me for a loop. I'm using the 2.6 release, thinking I was up to date, but its debug output doesn't look anything like what's described in the above link. It appears to document the upcoming 2.7 version, which
2010 Feb 17
2
[LLVMdev] Source Code Location of an Instruction
On 16 February 2010 20:49, Trevor Harmon <Trevor.W.Harmon at nasa.gov> wrote: > We were discussing that a few days ago: > > http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-February/029245.html Hi Trevor, On a similar question, I'd want to see what line is being compiled to which instructions. Is it possible to print the before the instructions as comment? For example:
2010 Nov 13
0
[LLVMdev] dyn_cast vs. dynamic_cast
Trevor Harmon <Trevor.W.Harmon at nasa.gov> writes: [snip] > Could someone > please explain why I should use dyn_cast instead of dynamic_cast? (I > thought all classes have v-tables...) Thanks, For reducing executable size, LLVM builds with RTTI disabled where possible.
2010 Feb 25
2
[LLVMdev] Programmatic compilation of C++ file into bitcode
On Feb 25, 2010, at 2:28 PM, Trevor Harmon wrote: > I'm not sure how the other program can find the output, unless > of course the analyzer simply dumps the file to a hard-coded > location (/tmp?). Replying to myself again... After sifting through many of the existing transforms, I discovered that new command-line parameters can be added to opt simply by declaring them in the
2010 Mar 31
0
[LLVMdev] CFG entry and exit blocks
On Wed, Mar 31, 2010 at 2:59 PM, Trevor Harmon <trevor.w.harmon at nasa.gov> wrote: > I'm wondering what would cause a CFG not to have a return block. The > comments in UnifyFunctionExitNodes.cpp say: "If there are no return > stmts in the Function, a null pointer is returned." But this doesn't > make sense; even an empty void function has a return block with a
2010 Feb 17
0
[LLVMdev] Source Code Location of an Instruction
On Wed, Feb 17, 2010 at 3:07 AM, Renato Golin <rengolin at systemcall.org> wrote: > On 16 February 2010 20:49, Trevor Harmon <Trevor.W.Harmon at nasa.gov> wrote: >> We were discussing that a few days ago: >> >> http://lists.cs.uiuc.edu/pipermail/llvmdev/2010-February/029245.html > > Hi Trevor, > > On a similar question, I'd want to see what line is
2010 May 10
1
[LLVMdev] getTripCount requires which optimization passes?
On May 10, 2010, at 11:45 AM, Dan Gohman wrote: > just make your front-ends add -indvars before > adding your pass. Sorry, I don't have a clue how to do this, and I can't find any docs about it. I'm using llvm-gcc; how can I tell it to add a pass? Trevor
2010 Feb 25
0
[LLVMdev] Programmatic compilation of C++ file into bitcode
On Feb 25, 2010, at 11:16 AM, Trevor Harmon wrote: > Is there perhaps some structured mechanism for retrieving the output > of an LLVM pass? That is, something better than just parsing the > output of "opt"... On rereading the opt documentation, I see: "In a few cases, it will ... generate a file with the analysis output, which is usually done when the output is meant
2010 Nov 13
3
[LLVMdev] dyn_cast vs. dynamic_cast
LLVM has a relatively large number of proprietary replacements for standard C++ functions and classes. One of these is dyn_cast to replace dynamic_cast. The two calls appear to be semantically equivalent; the only difference that I can see is that dyn_cast reportedly works on classes that have no v-table [1]. Could someone please explain why I should use dyn_cast instead of dynamic_cast?
2010 Feb 16
0
[LLVMdev] Source Code Location of an Instruction
On Feb 13, 2010, at 7:22 AM, Jingyue Wu wrote: > I would like to know how to locate an LLVM instruction in the source > code, i.e. to get the line number of its corresponding source code > statement. I remember in LLVM 2.4, DbgStopPointInst is designed to > help this locating, but it seems deprecated in the latest LLVM. We were discussing that a few days ago:
2010 Mar 31
2
[LLVMdev] CFG entry and exit blocks
On Mar 30, 2010, at 7:51 PM, John Criswell wrote: > I'm too lazy to convert your .dot file into a graph file What format should I have posted? (I'm not sure what you mean by "graph file".) I had thought that .dot was the preferred format here, since that's what LLVM generates (e.g., "opt -dot-cfg ..."). > First, LLVM does not guarantee that a function
2010 Feb 26
0
[LLVMdev] Programmatic compilation of C++ file into bitcode
On Thursday 25 February 2010 17:30:24 Trevor Harmon wrote: > On Feb 25, 2010, at 2:28 PM, Trevor Harmon wrote: > > I'm not sure how the other program can find the output, unless > > of course the analyzer simply dumps the file to a hard-coded > > location (/tmp?). > > Replying to myself again... > > After sifting through many of the existing transforms, I
2010 Jul 14
0
[LLVMdev] CallGraphSCCPass: symbol not found
-----Original Message----- From: Trevor Harmon <Trevor.W.Harmon at nasa.gov> Sent: Tuesday, July 13, 2010 4:46 PM To: Duncan Sands <baldrick at free.fr> Cc: llvmdev at cs.uiuc.edu <llvmdev at cs.uiuc.edu> Subject: Re: [LLVMdev] CallGraphSCCPass: symbol not found > On Jul 12, 2010, at 11:37 PM, Duncan Sands wrote: > > > $ c++filt _ZTIN4llvm16CallGraphSCCPassE >
2010 May 10
2
[LLVMdev] Separate loop condition and loop body
On Mon, May 10, 2010 at 8:05 PM, Trevor Harmon <Trevor.W.Harmon at nasa.gov> wrote: > On May 10, 2010, at 8:43 AM, Xinfinity wrote: > >> Is it possible to get the list of BasicBlocks building the condition >> of a loop and the list of BasicBlocks that form the body? > > Based on my (limited) experience with Loop and LoopInfo, this isn't > possible. (But
2010 Apr 21
1
[LLVMdev] determining the number of iteration of a loop
In your example the the number of iterations is known -- it is N. It is not known at compile time, but it's known at run-time before you enter the loop. So you can do transforms like if( N < threshold ) copy of loop optimized for small iterations count; else copy of loop optimized for large iterations count; But you are right, in general, the number of iterations in unknown. I think Khaled