search for: succ_iterators

Displaying 20 results from an estimated 27 matches for "succ_iterators".

Did you mean: succ_iterator
2020 Mar 09
3
RFC: Making a common successor/predecessor interface
Hi, As part of an ongoing work to extend the GraphDiff (this models a CFG view), I came across the need to have a common interface for accessing successors/predecessors in various IR units, such that a type such as `typename NodeT::succ_iterator` could be used in templated code. In particular, the need arose for BasicBlocks, MachineBasicBlocks, VPBlockBase and clang::CFGBlock. The least invasive
2020 Mar 10
4
RFC: Making a common successor/predecessor interface
Hi Dave, It may be possible to do this with the current API, but what I was looking for is a common API for existing block types. For example there is no succ_begin for Machine BasicBlock. I'm looking to make the CFGSuccessors and CFGPredecessors classes in CFGDiff.h templated, and this needs a common API for all types instantiations. Does this clarify your question or did I misunderstand
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 do it in a way not so elegant. Take the last BB of every function, then getTerminator and see that function it is called and then link to (instruction-2-instruction). There must be there...
2013 Apr 26
2
[LLVMdev] CallGraph
...aph) 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 do it in a way not so elegant. Take the last BB of every function, >> then >> getTerminator and see that function it is called and then link...
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
0
[LLVMdev] CallGraph
...gt; > 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 do it in a way not so elegant. Take the last BB of every function, then > getTerminator and see that function it is called and then link to > (instruction-2-instruction...
2020 Mar 10
2
RFC: Making a common successor/predecessor interface
On Tue, Mar 10, 2020 at 2:30 PM David Blaikie <dblaikie at gmail.com> wrote: > > > On Tue, Mar 10, 2020 at 8:31 AM Alina Sbirlea <alina.sbirlea at gmail.com> > wrote: > >> Hi Dave, >> >> It may be possible to do this with the current API, but what I was >> looking for is a common API for existing block types. For example there is >> no
2013 Apr 26
0
[LLVMdev] CallGraph
...e 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 do it in a way not so elegant. Take the last BB of every function, > then > getTerminator and see that function it is calle...
2008 Mar 28
8
[LLVMdev] unwinds to in the CFG
I have a new plan for handling 'unwinds to' in the control flow graph and dominance. Just as a quick recap the problem I encountered is how to deal instructions in a block being used as operands in the unwind dest. Such as this: bb1: unwinds to %cleanup call void @foo() ; might throw, might not %x = add i32 %y, %z call void @foo() ; might throw, might not ret void cleanup:
2009 Sep 06
0
[LLVMdev] How to differentiate between external and internal calls in llc?
I have a MachineFunctionPass plugged into llc during LLVMTargetMachine::addPreRegAlloc. In this Pass I need to extend calls (i. e. CALL32m, CALL32r) iff they call function within the program. CALL32m has, I think, ten different possibilities for the four operands giving the target address. At the moment I have excluded calls that give the displacement as GlobalAddress or JumpTableIndex
2010 Oct 12
2
[LLVMdev] CFG extraction
Hello, I would like to extract Control Flow Graph and Data Flow Graph from a sample program written in C++, Can anybody please direct me to some examples? Thanks in advance -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20101012/fc071e63/attachment.html>
2008 Mar 28
0
[LLVMdev] unwinds to in the CFG
Sorry -- Small change. Nick Lewycky wrote: > A. redefine the CFG a bit. > i. pred_iterator stays the same. pred_iterator becomes an inverse of outedge_iterator. That is, edges that lead to the execution of this block, regardless of whether it's an unwind-edge or not. Nick
2003 Nov 20
0
[LLVMdev] Basic Block Chaining
On Thu, 20 Nov 2003, Reid Spencer wrote: > Newbie Question .. (sorry if its redundant/silly) .. No worries, this is good stuff to have archived on the list! > As I've started to develop Stacker, I had assumed that simply adding > BasicBlocks to a function in sequence would imply that there is an > implicit unconditional branch from the end of one basic block to the > start
2013 Jan 23
2
[LLVMdev] BlockFrequencyImpl asserts on multiple edges between same MBBs with different weights in LLVM 3.2
We are developing a new backend for a custom processor using LLVM. After updating to LLVM 3.2, we run into an assertion in BlockFrequencyImpl.h. The offending test-case looks basically like this: for ( ... ) { switch (i) { case 100: // do something break; case 102: // do something else break; case 103: // do some more break; case 104: // now something different
2018 May 24
0
LLVM Pass To Remove Dead Code In A Basic Block
> On 25 May 2018, at 01:46, Aaron via llvm-dev <llvm-dev at lists.llvm.org> wrote: > > Hi all, > > LLVM optimization pass gives an error "Terminator found in the middle of a basic block!" since basic block IR may have multiple "ret" instructions. It seems LLVM does not accept multiple return in a basic block by default. > Yes, if you’re inserting
2006 Jul 05
0
[LLVMdev] Critical edges
> If you don't want critical edges in the machine code CFG, you're going to > have to write a machine code CFG critical edge splitting pass: LLVM > doesn't currently have one. > > -Chris Hey guys, I've coded a pass to break the critical edges of the machine control flow graph. The program works fine, but I am sure it is not the right way of implementing it.
2018 May 24
2
LLVM Pass To Remove Dead Code In A Basic Block
Hi all, LLVM optimization pass gives an error "Terminator found in the middle of a basic block!" since basic block IR may have multiple "ret" instructions. It seems LLVM does not accept multiple return in a basic block by default. Is there a specific optimization or pass that I can enable to remove unreachable codes in basic blocks? Best, Aaron -------------- next part
2006 Jul 04
2
[LLVMdev] Critical edges
On Tue, 4 Jul 2006, Fernando Magno Quintao Pereira wrote: > However, it does not remove all the critical edges. I am getting a very > weird dataflow graph (even without the Break Critical edges pass). The > dataflow generated by MachineFunction::dump() for the program below is > given here: > http://compilers.cs.ucla.edu/fernando/projects/soc/images/loop_no_crit2.pdf ... > The
2003 Nov 20
3
[LLVMdev] Basic Block Chaining
Newbie Question .. (sorry if its redundant/silly) .. As I've started to develop Stacker, I had assumed that simply adding BasicBlocks to a function in sequence would imply that there is an implicit unconditional branch from the end of one basic block to the start of the next block. Based on the assertion checks that I get when I tried this, I assume that it is required to place a terminating
2018 May 24
2
LLVM Pass To Remove Dead Code In A Basic Block
Hi Dean, Thanks for your reply. That's exactly what I am doing, but I was looking for a default optimization or pass implementation if there was. I used BasicBlock::splitBasicBlock() but it puts "br" end of original basic block. I tried to delete the br instruction by using eraseFromParent() but it didn't work. I had to rewrite my own splitBasicBlock() by modifying the