search for: successor

Displaying 20 results from an estimated 925 matches for "successor".

Did you mean: successors
2017 Nov 11
2
Update control flow graph when splitting a machine basic block?
Thank you for your reply! > Every MachineBasicBlock has a list of successors; you can access it with > the successors() accessor. That's what you should be using for any CFG > analysis. I am aware of these methods of class MachineBasicBlock, which allows one to access a MachineBasicBlock's successors and predecessors in the CFG. But the CFG itself may no...
2011 Aug 02
2
[LLVMdev] Multiple successors, single dynamic successor
Suppose I have a bb with N predecessors and N successors. What is, in your opinion, the best way to express that the bb has (dynamically) only one successor (i.e. if coming from the i-th predecessor we will always jump to the i-th successor)? b.r., -- Carlo Alberto Ferraris <cafxx at strayorange.com <mailto:cafxx at strayorange.com>> we...
2011 Feb 01
5
[LLVMdev] Loop simplification
I have a (non-entry) basic block that contains only PHI nodes and an unconditional branch (that does not branch to itself). Is it always possible to merge this block with it's successor and produce a semantically equivalent program? I'm trying to undo some of the loop optimizations that LLVM has applied to my program to reduce a pair of nested loops to a single loop. llvm::MergeBlockIntoPredecessor does not do what I want since it requires that the the block have a uniqu...
2011 Aug 02
0
[LLVMdev] Multiple successors, single dynamic successor
...9;s not the case, then see if JumpThreading will do it for you. I'm not familiar with a way to express exactly what you want to say, but are you opposed to just duplicating the block? That is, you could duplicate the block, and have the ith predecessor go to the duplicate which goes to the ith successor. You can use JumpThreading::ThreadEdge in lib/Transforms/Scalar/JumpThreading.cpp as a guide. On Tue, Aug 2, 2011 at 10:22 AM, Carlo Alberto Ferraris <cafxx at strayorange.com> wrote: > Suppose I have a bb with N predecessors and N successors. What is, in your > opinion, the best way t...
2004 Oct 12
1
[LLVMdev] std::remove
...============== RCS file: /var/cvs/llvm/llvm/include/llvm/Analysis/IntervalIterator.h,v retrieving revision 1.18 diff -u -r1.18 IntervalIterator.h --- IntervalIterator.h 3 Sep 2004 18:19:51 -0000 1.18 +++ IntervalIterator.h 12 Oct 2004 16:04:37 -0000 @@ -220,7 +220,7 @@ if (Int->isSuccessor(NodeHeader)) { // If we were in the successor list from before... remove from succ list - Int->Successors.erase(remove(Int->Successors.begin(), + Int->Successors.erase(std::remove(Int->Successors.begin(), Int->Successors.end()...
2014 Nov 06
2
[LLVMdev] Should the MachineVerifier accept a MBB with a single (landing pad) successor?
...ifier failure on the attached testcase, and I'm tempted to say the verifier is wrong and should accept it. Skip the description for the proposed change. On AArch64, the verifier complains with: *** Bad machine code: MBB exits via unconditional branch but doesn't have exactly one CFG successor! *** - function: t4 - basic block: BB#5 invoke.cont41 The freshly selected relevant blocks are: BB#7: derived from LLVM BB %invoke.cont41 EH_LABEL <MCSym=Ltmp4> B <BB#8> Successors according to CFG: BB#8(1) BB#9(1) BB#8: derived from...
2017 Nov 11
2
Update control flow graph when splitting a machine basic block?
...hine basic block is split between two branches, as shown below: BB: ; Old machine basic block shortened by the split ... branch to A ------------------- ; Split here BB': ; New machine basic block created by the split branch to B ... BB' is a successor of BB (if there is no control flow barrier near the end of BB). In addition, targets of terminators like A should be added to the set of successors of BB and possibly removed from the set of successors of BB'. It is not always safe to remove B from the successors of BB', because A and B may...
2013 Apr 10
3
[LLVMdev] If Conversion and predicated returns
...come across a small issue when using the if conversion pass in PPC to generate conditional returns. Here's a small example: ** Before if conversion ** BB#0: derived from LLVM BB %entry %R3<def> = LI 0 %CR0<def> = CMPLWI %R3, 0 BCC 68, %CR0, <BB#3> Successors according to CFG: BB#3(16) BB#1(16) BB#1: derived from LLVM BB %while.body.lr.ph Live Ins: %R3 Predecessors according to CFG: BB#0 %CR0<def> = CMPLWI %R3<kill>, 0 BCC 68, %CR0, <BB#3> Successors according to CFG: BB#3(16) BB#2(16) BB#2: derived from...
2013 Jul 31
1
[LLVMdev] Problem to remove successors
Hi All, I need to remove successors from every basic block to insert new ones I tried this code, but it doesn't work void RemoveSuccessor(TerminatorInst *TI, unsigned SuccNum) { assert(SuccNum < TI->getNumSuccessors() && "Trying to remove a nonexistant successor!"); // If our old succe...
2011 Feb 01
0
[LLVMdev] Loop simplification
On Feb 1, 2011, at 1:08 PM, Andrew Clinton wrote: > I have a (non-entry) basic block that contains only PHI nodes and an > unconditional branch (that does not branch to itself). Is it always > possible to merge this block with it's successor and produce a > semantically equivalent program? I'm trying to undo some of the loop > optimizations that LLVM has applied to my program to reduce a pair of > nested loops to a single loop. > > llvm::MergeBlockIntoPredecessor does not do what I want since it > requires t...
2013 Aug 12
2
[LLVMdev] TerminatorInst and changing successor
Hi, Is changing the successors for each basic blocks means by default that the Terminator Instruction will be changed or this is another problem should be solved? If case 2 please tell me how to change it according to the new successors? Thanks -- * Rasha Salah Omar Msc Student at E-JUST Demonestrator at Facult...
2017 Jul 27
2
Tail merging "undef" with a defined register: wrong code
The comment in test/CodeGen/X86/branchfolding-undef.mir states that such merging is legal, however doing so can actually generate wrong code: Consider this (valid code): --- name: fred tracksRegLiveness: true body: | bb.0: successors: %bb.1, %bb.2 J2_jumpt undef %p0, %bb.2, implicit-def %pc J2_jump %bb.1, implicit-def %pc bb.1: successors: %bb.3 %r0 = L2_loadruh_io undef %r0, 0 PS_storerhabs 0, killed %r0 J2_jump %bb.3, implicit-def %pc bb.2: successors: %bb.3 PS_stor...
2010 Sep 02
4
[LLVMdev] [LLVMDev] [Question] about TerminatorInst
Under what circumstances will a TerminatorInst will have multiple successors? The three methods: virtual BasicBlock *getSuccessorV(unsigned idx) const = 0; virtual unsigned getNumSuccessorsV() const = 0; virtual void setSuccessorV(unsigned idx, BasicBlock *B) = 0; are defined for the TerminatorInst class, but I cannot see why a terminator is allowed to go to diffe...
2017 Jul 28
2
Tail merging "undef" with a defined register: wrong code
I've looked into that and it's not going to be simple, unfortunately. Here's the original example again: --- name: fred tracksRegLiveness: true body: | bb.0: successors: %bb.1, %bb.2 J2_jumpt undef %p0, %bb.2, implicit-def %pc J2_jump %bb.1, implicit-def %pc bb.1: successors: %bb.3 %r0 = L2_loadruh_io undef %r0, 0 PS_storerhabs 0, killed %r0 J2_jump %bb.3, implicit-def %pc bb.2: successors: %bb.3 PS_stor...
2017 Nov 10
2
Update control flow graph when splitting a machine basic block?
...s target is within its range (https://reviews.llvm.org/D38918). However, it doesn't appear to be straightforward how the control flow graph should be updated when a machine basic block is split, especially when the split point is between two branches. In this case, in order to determine the successors of each of the two machine basic block, one needs to know the target of each terminator. If we ignore indirect branches whose targets are not known at compile-time, I wonder whether something like the following is viable or not: empty mbb.successors fallthrough = true for each terminator i i...
2009 Dec 04
4
[LLVMdev] hi, Hi, (Preccessors' Number) < MachineBasicBlock's Number < (Successors's Number), Is it really?
Hi, EveryOne: I am travelling CFG with MachineFunction. So I want to sure it. (Preccessors' Number) < MachineBasicBlock's Number < (Successors's Number), Is it really? best regards. ___________________________________________________________ 好玩贺卡等你发,邮箱贺卡全新上线! http://card.mail.cn.yahoo.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attach...
2008 Nov 19
2
[LLVMdev] Problem in CodeExtractor::severSplitPHINodes()
...der block into two, one containing only PHI nodes and the other containing the remaining non-PHI nodes. The variable NewBB holds the pointer to the latter half block. Later, it tries to update DT information. if (DT) DT->splitBlock(NewBB); In splitBlock, it checks if the NewBB has only one successor. I'm not sure why this is required, but it will fail on cases where NewBB has multiple successors, which are pretty common. For example, a switch or a conditional branch in NewBB can break this check. Could anyone tell me how to fix this please? Thanks a lot. Jack -------------- next part --...
2011 Feb 01
1
[LLVMdev] Breaking critical edges
Is the pass "Break Critical edges" acheives the same as edge-splitting SSA, i.e., a node has either multiple predecessors or multiple successors but not both. A node with multiple predecessors and multiple successors is replaced by two consecutive nodes joined together. The first node has multiple predecessors and second node as its only successor. The second node has first node as its only predecessor and has mutliple successors.
2017 Jul 27
2
Tail merging "undef" with a defined register: wrong code
.../CodeGen/X86/branchfolding-undef.mir states that such merging is legal, however doing so can actually generate wrong code: >> >> Consider this (valid code): >> >> --- >> name: fred >> tracksRegLiveness: true >> >> body: | >> bb.0: >> successors: %bb.1, %bb.2 >> J2_jumpt undef %p0, %bb.2, implicit-def %pc >> J2_jump %bb.1, implicit-def %pc >> >> bb.1: >> successors: %bb.3 >> %r0 = L2_loadruh_io undef %r0, 0 >> PS_storerhabs 0, killed %r0 >> J2_jump %bb.3,...
2018 May 16
0
Bug in TailDuplicator?
...licator (called from MachineBlockPlacement in my case), when duplicating a block that contains an implicit fall-through. Suppose you have the following blocks BB#1: Predecessors according to CFG: BB#2 ... conditional_branch <BB#3> < implicit fall-through to BB#2 > Successors according to CFG: BB#2 BB#3 BB#2: Predecessors according to CFG: BB#1 BB#0 ... unconditional_branch <BB#1> Successors according to CFG: BB#1 BB#3: Predecessors according to CFG: BB#1 ... It duplicates BB#1 into BB#2 but misses out the branch that goes back up: BB#2:...