Displaying 20 results from an estimated 8000 matches similar to: "[LLVMdev] Separate loop condition and loop body"
2010 May 10
0
[LLVMdev] Separate loop condition and loop body
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 don't take my word for it.)
> My aim is to manipulate for loops, while and do-while loops unitary,
> but I
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 May 10
3
[LLVMdev] Separate loop condition and loop body
On Mon, May 10, 2010 at 12:32:06PM -0700, Trevor Harmon wrote:
> On May 10, 2010, at 11:35 AM, Benoit Boissinot wrote:
>
> >To me it looks like any basic block from the loop body with a
> >successor not in the loop body is a BB "building the condition" (an
> >"exit" block).
>
> I assume you mean "any basic block from the loop header".
2010 May 10
0
[LLVMdev] Separate loop condition and loop body
On May 10, 2010, at 11:05 AM, Trevor Harmon wrote:
>>> To me it looks like any basic block from the loop body with a
>>> successor not in the loop body is a BB "building the condition" (an
>>> "exit" block).
>>
>> I assume you mean "any basic block from the loop header".
>
> No really, loop body.
In that case, what does
2010 May 10
0
[LLVMdev] Separate loop condition and loop body
On May 10, 2010, at 11:35 AM, Benoit Boissinot wrote:
> To me it looks like any basic block from the loop body with a
> successor not in the loop body is a BB "building the condition" (an
> "exit" block).
I assume you mean "any basic block from the loop header".
I don't think your rule will work. Consider this counterexample:
while (j < 10
2010 May 11
0
[LLVMdev] Separate loop condition and loop body
>>> To me it looks like any basic block from the loop body with a
>>> successor not in the loop body is a BB "building the condition" (an
>>> "exit" block).
>>
Consider break statements (CFG attached):
while (j < 10 && j > 5 && j % 2 == 0) {
j++;
if (j == 9)
break;
}
In this example, block
2010 Mar 05
3
[LLVMdev] How to .. jump from inline asm to a BasicBlock?
Hello,
I have a problem trying to create an inline asm that checks one condition
and based on the result of the condition it should jump to one BasicBlock or
to another. My question is: is this possible in LLVM, from the inline asm to
jump out, to the LLVM code, and if it is, how can I pass the label to which
the code should jump.
I tried passing the address of the BasicBlocks, using
2005 Aug 12
3
General expression of a unitary matrix
Hi, all,
Does anybody got the most general expression of a unitary matrix?
I found one in the book, four entries of the matrix are:
(cos\theta) exp(j\alpha); -(sin\theta)exp(j(\alpha-\Omega));
(sin\theta)exp(j(\beta+\Omega)); (cos\theta) exp(j\beta);
where "j" is for complex.
However, since for any two unitary matrices, their product should also
be a unitary matrix. When I
2011 Mar 01
3
[LLVMdev] metadata to inform the optimizers that some code should stay unchanged
Hello LLVM,
I am working on some passes that perform code transformations. Since I am
interested in performance, I apply the O3 passes, right after my pass.
However, the optimization passes modify the code inserted by my pass in an
undesirable way. As far I know, there is no way to prevent the optimizers
from optimizing some regions of code. So what I intend to do is to attach
metadata to the
2010 Oct 13
4
[LLVMdev] Values have no names when generating *.ll files in clang and llvm 2.8 ?
Hello,
I upgraded to llvm 2.8 and when I generate *.ll files from C/C++ with
clang -S -emit-llvm I obtain a *.ll file in which instructions and
basicblocks have no names.
I tried as well compiling with the -g option, but no names were given.
In the release notes it is indicated to use "--show-annotations" to print
the number of uses. Is there something similar for assigning names to
2010 Mar 15
1
[LLVMdev] CFG as DOT: where do node addresses come from?
Hi,
The -dot-cfg option of opt will write a diagram of an analyzed
function's CFG to DOT format. If you then open the DOT file, you will
see that the BasicBlocks are uniquely identified with hexadecimal
addresses. For example, an edge from one block to another may look like:
Node0x10026b0:s0 -> Node0x1004c20;
I've been trying to figure out where these hexadecimal addresses
2011 Mar 04
0
[LLVMdev] metadata to inform the optimizers that some code should stay unchanged
Xinfinity wrote:
>
>
> Hello LLVM,
>
> I am working on some passes that perform code transformations. Since I am
> interested in performance, I apply the O3 passes, right after my pass.
> However, the optimization passes modify the code inserted by my pass in an
> undesirable way. As far I know, there is no way to prevent the optimizers
> from optimizing some regions of
2010 Mar 26
2
[LLVMdev] Why is BasicBlock's copy constructor private?
On Mar 25, 2010, at 5:23 PM, me22 wrote:
> Given that LLVM is already managing the memory and presumably will do
> so for the life of your graph processing, could you just use a
> boost::directed_graph<llvm::BasicBlock*> instead?
Yeah, that was one of the first things I tried:
for (Function::iterator i = function.begin(), e = function.end(); i !=
e; ++i) {
BasicBlock
2010 Mar 26
3
[LLVMdev] Why is BasicBlock's copy constructor private?
Hi,
LLVM provides basic graph traversal for its CFGs, but I need
additional operations, such as iterating over the edges. I thought I
would solve this problem using the Boost graph library. It should be
relatively simple to walk an LLVM CFG and add the BasicBlock objects
to a Boost graph declared as:
typedef boost::directed_graph<llvm::BasicBlock> Graph;
Once constructed, this
2010 Oct 21
2
[LLVMdev] Splitting basic blocks while preserving machine code
On Wed, Oct 20, 2010 at 7:19 PM, Jim Grosbach <grosbach at apple.com> wrote:
>
> On Oct 20, 2010, at 5:16 PM, Trevor Harmon wrote:
>> I'm writing a pass that does some static analysis on C code. A
>> critical requirement of the pass is that it must preserve not only the
>> correctness of the code but also its timing -- It cannot add or remove
>> even one CPU
2009 Jul 29
3
predict
I have found a regression model, and i would like to predict value in
different points. I have tried to use predict function but it doesn't work.
I have used predict function like this:
newdata<-seq(from=0.1, to=0.32,by=0.02)
data<-predict(fm,newdata)
where fm is a regression model. The predict function return me that:
Error in eval(predvars, data, env) : numeric argument
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 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() ==
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 Oct 21
2
[LLVMdev] Splitting basic blocks while preserving machine code
Hi,
I'm writing a pass that does some static analysis on C code. A
critical requirement of the pass is that it must preserve not only the
correctness of the code but also its timing -- It cannot add or remove
even one CPU cycle from the resulting machine code. To put it another
way, the binary executable that is produced when the pass is present
must be identical to what is produced