Displaying 20 results from an estimated 10000 matches similar to: "[LLVMdev] Branch Question"
2011 Nov 20
1
[LLVMdev] Order of Basic Blocks
Sorry, forgot to add group to CC.
On Sun, Nov 20, 2011 at 6:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> Cameron,
>
> To make it less vague, I would ideally like to traverse top down. I
> believe what you suggested is what I want, I will have a look at it.
>
> Currently, I am iterating over the BBs in a Function, so
> Function::iterator BBitr=F->begin(),
2011 Nov 20
3
[LLVMdev] Order of Basic Blocks
LLVMers,
Is there any way to guarantee iteration of the basic blocks from top down
or path to path? Currently it looks sort of semi-random, sometimes visiting
loop heads first and other times loop tails, is there a way I can visit the
BBs top down or path to path?
Thank you.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2011 Nov 21
0
[LLVMdev] Order of Basic Blocks
Is there a way to cast the rpo_iterator to a basic block pointer? I need to
use the functions of the class Basic Block.
On Sun, Nov 20, 2011 at 3:15 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
> Sorry, forgot to add group to CC.
>
> On Sun, Nov 20, 2011 at 6:14 PM, Ryan Taylor <ryta1203 at gmail.com> wrote:
>
>> Cameron,
>>
>> To make it less vague,
2011 Nov 21
1
[LLVMdev] Fwd: Order of Basic Blocks
---------- Forwarded message ----------
From: Ryan Taylor <ryta1203 at gmail.com>
Date: Mon, Nov 21, 2011 at 10:30 AM
Subject: Re: [LLVMdev] Order of Basic Blocks
To: Benjamin Kramer <benny.kra at googlemail.com>
This worked, though the RPO_iterator apparently wasn't what I was looking
for anyways, it seems it doesn't rreally go top->down.
I have a simple example code,
2012 Feb 09
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
This is the .ll for that graph (attached). I think I understand what
you are saying.
This particular testcase returns CNC not because the exit block
doesn't have a unique predecessor, but because the unique predecessor
(the inner loop block) has a successor that is inside the loop (in
this case itself, because it's the inner loop block).
That doesn't change, anyway, the assuption that
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Well, it wasn't intended as a "real" patch to be included , but more
as a "proof of concept" for a solution. Do you think it is a valid
solution and I'm correct in my assumption? If so then I'll clean up
the patch and attach a testcase for inclusion.
Thanks!
Marcello
2012/2/9 Nick Lewycky <nlewycky at google.com>:
> Your patch should include a testcase,
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Hello, I'm finding problems with BackEdgeTaken count calculation in
even simple fortran loops with gfortran-4.6 + DragonEgg 3.0.
Even for simple double loops like this one:
program test2
integer i,j,k
dimension k(100,100)
do j=1,100
do i=1,100
k(i,j) = i
enddo
enddo
write(*,*) k(1,30)
end
make the ScalarEvolution
2012 Feb 08
2
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Attached
2012/2/8 Marcello Maggioni <hayarms at gmail.com>:
> Mmm, sorry, the patch I posted crashes if ExitBr is null (which it may
> be ...) , this one should be ok (and passess all the ScalarEvolution
> tests in LLVM):
>
> diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
> index daf7742..b10fab2 100644
> ---
2009 May 08
2
[LLVMdev] Splitting a basic block, replacing it's terminator
Hi,
I want to insert a conditional branch in the middle of a basic block.
To that end, I am doing these steps:
(1) Split the basic block:
bb->splitBasicBlock()
(2) Remove the old terminator:
succ->removePredecessor(bb)
bb->getTerminator()->getParent()
(3) Adding a new terminator:
BranchInst::Create(ifTrue, ifFalse, cnd, "", bb);
That seems to work, but later passes
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
On 8 February 2012 15:50, Marcello Maggioni <hayarms at gmail.com> wrote:
> Well, it wasn't intended as a "real" patch to be included , but more
> as a "proof of concept" for a solution. Do you think it is a valid
> solution and I'm correct in my assumption? If so then I'll clean up
> the patch and attach a testcase for inclusion.
>
I'm
2012 Feb 09
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
This is instead a very simple (handmade) test case that triggers the
problem (attached)
Also a more conforming patch has been attached
2012/2/9 Marcello Maggioni <hayarms at gmail.com>:
> This is the .ll for that graph (attached). I think I understand what
> you are saying.
> This particular testcase returns CNC not because the exit block
> doesn't have a unique predecessor,
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Mmm, sorry, the patch I posted crashes if ExitBr is null (which it may
be ...) , this one should be ok (and passess all the ScalarEvolution
tests in LLVM):
diff --git a/lib/Analysis/ScalarEvolution.cpp b/lib/Analysis/ScalarEvolution.cpp
index daf7742..b10fab2 100644
--- a/lib/Analysis/ScalarEvolution.cpp
+++ b/lib/Analysis/ScalarEvolution.cpp
@@ -4293,9 +4293,15 @@
2012 Feb 09
1
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
FInally I had the time to complete everything up. Now I included the
test case in the patch and the testcase runs with the LLVM tests
system.
2012/2/9 Marcello Maggioni <hayarms at gmail.com>:
> This is instead a very simple (handmade) test case that triggers the
> problem (attached)
> Also a more conforming patch has been attached
>
> 2012/2/9 Marcello Maggioni <hayarms
2012 Feb 08
0
[LLVMdev] BackedgeTakenCount calculation for fortran loops and DragonEgg gfortran-4.6
Your patch should include a testcase, see test/Analysis/ScalarEvolution for
examples. "BranchInst* " should be "BranchInst *". You should have spaces
after the // in your comments. One of the comment lines isn't indented
properly.
Nick
On 8 February 2012 12:05, Marcello Maggioni <hayarms at gmail.com> wrote:
> Attached
>
> 2012/2/8 Marcello Maggioni
2004 Aug 27
1
[LLVMdev] Help getting condition of branch instructions in pass
Hi, this is a bit of a newbie question:
I am trying to discover, given a block with a conditional and its
successors, which condition (T/F) each successor applies to.
There's almost identical code in CFGPrinter.cpp, but where it gets
called in GraphWriter.h, the child_iterator type is a pretty hairy
thing, so I still don't quite understand how to get one from a
BasicBlock in my own
2013 Apr 26
2
[LLVMdev] CallGraph
Hello,
I try to make a big CFG (control flow graph) by combining all the CFG-s
from all the functions of a module. I still have one problem : I want to
get the links between functions.
For CFG-s, I used CallGraphNode->second->getFunction, then
Function_iterators and succ_iterators, so I have all the links between BBs.
Now, the questions is how do I link BBs from different functions?
I can
2009 May 08
0
[LLVMdev] Splitting a basic block, replacing it's terminator
On May 8, 2009, at 4:02 PM, Nick Johnson wrote:
> I want to insert a conditional branch in the middle of a basic block.
> To that end, I am doing these steps:
>
> (1) Split the basic block:
> bb->splitBasicBlock()
>
> (2) Remove the old terminator:
> succ->removePredecessor(bb)
> bb->getTerminator()->getParent()
Assuming that the new block will still be a
2013 Apr 26
2
[LLVMdev] CallGraph
Thanks for the response.
I looked and I cannot see what exactly I need. I saw getCalledFunction() so
I need CallSite CS(cast<Value>(II)) where II is a basic block iterator, so
an instruction. It seems not easier than the "unelegant" version....if I am
still at the Instruction level...
I need a method that takes from a "leaf" basic block from a function (Maybe
there is
2013 Apr 26
0
[LLVMdev] CallGraph
Hi,
On 26/04/13 11:19, Alexandru Ionut Diaconescu wrote:
> Hello,
>
> I try to make a big CFG (control flow graph) by combining all the CFG-s from all
> the functions of a module. I still have one problem : I want to get the links
> between functions.
>
> For CFG-s, I used CallGraphNode->second->getFunction, then Function_iterators
> and succ_iterators, so I have all
2011 Jan 03
1
[LLVMdev] Erasing dead blocks
Dear LLVM developers,
I have a question regarding the IPSCCP class and the handling of dead blocks:
The file lib/Transforms/Scalar/SCCP.cpp of llvm 2.8 from contains some
code to deal with a dead block which could not be folded (line
1909ff). This happens when a user of this dead block is a branch or
switch with an undef condition. The action taken than is to replace
this terminator with an