search for: predecessors

Displaying 20 results from an estimated 1023 matches for "predecessors".

2020 May 17
2
Question about the order of predecessors in LoopVectorizer with VPlanNatviePath
...ou can see, %vec.phi has wrong incoming basic blocks. It could be as below. %vec.phi = phi <4 x i64> [ %8, %for.cond.cleanup972 ], [ zeroinitializer, %vector.body ] The problem comes from "InnerLoopVectorizer::fixNonInductionPHIs()". This function has assumption about the order of predecessors as below. // The predecessor order is preserved and we can rely on mapping between // scalar and vector block predecessors. for (unsigned i = 0; i < NumIncomingValues; ++i) { It seems it assumes loop latch as first predecessor and loop preheader as second one or something like that...
2015 Jul 23
1
[LLVMdev] Is loop header required to have at least one predecessor outside the loop?
...cept, which requires /// the predecessor to have exactly one successor. /// template<class BlockT, class LoopT> BlockT *LoopBase<BlockT, LoopT>::getLoopPredecessor() const { // Keep track of nodes outside the loop branching to the header... BlockT *Out = nullptr; // Loop over the predecessors of the header node... BlockT *Header = getHeader(); typedef GraphTraits<Inverse<BlockT*> > InvBlockTraits; for (typename InvBlockTraits::ChildIteratorType PI = InvBlockTraits::child_begin(Header), PE = InvBlockTraits::child_end(Header); PI != PE; ++PI) { type...
2016 Sep 21
3
Propagation of debug information for variable into basic blocks.
...ss the variable b in a debugger (especially as it is actually referenced in the loop). Unfortunately this is often not the case. I believe that this is due to the requirement stated in the descriptive comment of LiveDebugValues::join() which states: "if the same source variable in all the predecessors of @MBB reside in the same location." In our simple example we end up with a series of blocks like BB#0 Initial-block Predecessor: Successor: BB#2 BB#1 for-body Predecessor: BB#2 Successor: BB#2 BB...
2017 Apr 26
2
Collectively dominance
...\ >>> B C >>> \ / >>> D >>> >>> As a set, B + C dominate D. >>> >>> The set you are looking for there is (i believe): >>> >>> For each predecessor, walk the idom tree until you hit NCA of all >>> predecessors. >>> >> "For each predecessor" do you mean "For each predecessor of the basic blocks in the set"? I.e. for each predecessor of B and C in this example. Thanks Hongbin > What do you mean by NCA? >> > > Nearest common ancestor > > If you have...
2017 Apr 26
2
Collectively dominance
...gt; D >>>>> >>>>> As a set, B + C dominate D. >>>>> >>>>> The set you are looking for there is (i believe): >>>>> >>>>> For each predecessor, walk the idom tree until you hit NCA of all >>>>> predecessors. >>>>> >>>> "For each predecessor" do you mean "For each predecessor of the basic >> blocks in the set"? I.e. for each predecessor of B and C in this example. >> > > No, for each predecessor of D. > > The definition of dominance...
2007 Dec 20
4
[LLVMdev] First time!
Hi! I want to know How to count the number of predecessors for each basic block? Thank You ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
2011 Feb 01
3
[LLVMdev] Loop simplification
On Feb 1, 2011, at 1:34 PM, Andrew Trick wrote: > 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
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.
2006 Apr 27
0
last stupid question today
(well, from me anyway. I promise) Trying to follow the "Self-referential Many-to-Many Relationships" recipe from the Rails Recipes book. This is what I''m doing: Tasks can have a predecessor relationship with each other. My Task class has this: has_and_belongs_to_many :predecessors, :class_name => "Task", :join_table => "predecessor", :association_foreign_key => "predecessor_id", :foreign_key => "task_id" The join table predecessor looks like this: CREATE TABLE predecessor ( predecessor_id BIGIN...
2017 Apr 26
1
Collectively dominance
...;> >>>>>> As a set, B + C dominate D. >>>>>> >>>>>> The set you are looking for there is (i believe): >>>>>> >>>>>> For each predecessor, walk the idom tree until you hit NCA of all >>>>>> predecessors. >>>>>> >>>>> "For each predecessor" do you mean "For each predecessor of the basic >>> blocks in the set"? I.e. for each predecessor of B and C in this example. >>> >> >> No, for each predecessor of D. >> >...
2015 Apr 05
3
[LLVMdev] alloca not in first bb behaving differently
...= %entry store i32 3, i32* %i %0 = load i32* %i ret i32 %0 if.else: ; preds = %entry ret i32 2 if.end: ; preds = %after_ret1, %after_ ret ret i32 1 after_ret: ; No predecessors! br label %if.end after_ret1: ; No predecessors! br label %if.end after_ret2: ; No predecessors! ret i32 0 } The following IR is slightly different in that the alloca is defined not in the first basic block: defin...
2011 Feb 01
0
[LLVMdev] Loop simplification
Here's what I've got so far - it seems to work, aside from the fact that DeleteDeadPHIs is not removing at least one dead PHI in my test program. --------------------- static bool mergeBlockIntoSuccessor(BasicBlock *pred, BasicBlock *succ) { if (succ == pred) return false; if (pred->getFirstNonPHI() != pred->getTerminator()) return false; //
2007 Dec 20
0
[LLVMdev] First time!
Hi aditya, There are two ways to cound the number of predecessors for each basic block. You can generate the control flow graph using the CallGraphScc pass with the granularity of basic block and can simply traverse the graph bottom up till the root. The number of nodes encountered would be the number of predecessors. The second way would be to use the special...
2016 Sep 21
2
Propagation of debug information for variable into basic blocks.
> On Sep 21, 2016, at 2:23 PM, Daniel Berlin <dberlin at dberlin.org> wrote: > > > > // For all predecessors of this MBB, find the set of VarLocs that > // can be joined. > for (auto p : MBB.predecessors()) { > auto OL = OutLocs.find(p); > // Join is null in case of empty OutLocs from any of the pred. > if (OL == OutLocs.end()) > return false; > > > This...
2013 Mar 03
0
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...es are required to include all its predecessor blocks > no matter they have input or not? That's the way SSA works - each input to a block must be provided by all paths leading to the block. That must be from each immediate predecessor or from a common predecessor of two or more immediate predecessors that do not mutate the value. > What about successor blocks? Are they optional if they don't provide inputs? The question doesn't make sense; we're only concerned with the predecessors here. If you have a loop, some successor (possibly the block of interest) is also a predecessor...
2013 Mar 03
2
[LLVMdev] Question about method CodeExtractor::severSplitPHINodes
...the first one. I don't quite get it. What if > > the first PHI node contains only incoming values from inside the region, > > while subsequent PHI nodes have inputs from outside? Is that possible? > > No, it's not possible. All PHI nodes must include inputs for _all_ > predecessors of the block, so only one PHI node needs to checked for the > origins. > > - Chuck > > > THIS COMMUNICATION MAY CONTAIN CONFIDENTIAL AND/OR OTHERWISE PROPRIETARY > MATERIAL and is thus for use only by the intended recipient. If you > received this in error, please contact t...
2008 Jan 22
3
[LLVMdev] Walking all the predecessors for a basic block
Hi all, Is there a way to walk through ALL the predecessors of a basic block in a CFG. I tried to iterate over the preds using this method for (pred_iterator PI = pred_begin(BB), E = pred_end(BB); PI != E; ++I) { BasicBlock *PredBB = *PI; } but this only gives the immediate predecessors for a basic block. For example, in this sample control flow graph...
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 mutl...
2013 Nov 15
2
[LLVMdev] dominator, post-dominator and memory leak
Hi Henrique, I have tried using -mergereturn and inserting a free into the predecessors of dominance frontier of malloc block and it caused double free. It is possible for multiple free's to be inserted on the path from malloc to an exit. For example, in the following CFG: BB10 (malloc) / \ BB11 BB12 ... / \ /...
2013 Nov 15
0
[LLVMdev] dominator, post-dominator and memory leak
Try breaking the critical edges (-break-crit-edges). This way, a new block will be created between BB13 and BB11 (call this BB11.break) and BB15 and BB12 (call this BB12.break). The predecessors of the dominance frontier will, thus, be BB11.break, BB12.break, and BB14. When we enter through a block with a call to malloc(), we will end up in one of the blocks in the dominance frontier (kind of). These blocks must have multiple predecessors, else it would not be in the dominance frontier. I...