search for: pred_iterator

Displaying 20 results from an estimated 30 matches for "pred_iterator".

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
2008 Mar 29
0
[LLVMdev] Tracking down the "pred_iterator out of range" assert
That's my patch. Do you have steps to reproduce? Nick Scott Michel wrote: > I've finally been able to get back to a little hacking, and I've tracked > down the before/after SVN revision numbers where this assert gets triggered: > > 47988: No assert > 47989: Assert gets triggered during 'make check' > > This bug pops up when building Release from
2008 Mar 29
2
[LLVMdev] Tracking down the "pred_iterator out of range" assert
I've finally been able to get back to a little hacking, and I've tracked down the before/after SVN revision numbers where this assert gets triggered: 47988: No assert 47989: Assert gets triggered during 'make check' This bug pops up when building Release from bootstrap on x86 Darwin (Mac OS X 10.4.11) using XCode 2.5's gcc 4.0.1. I've looked at the diffs between the two
2011 Oct 14
0
[LLVMdev] BasicBlock succ iterator
...all blocks, each block have a Terminator instruction and each blocks belongs to a function. I'm really confused. I guess the problem is caused by the removal of the Loop,The code is as follows: * //every block to header (except the ones in the loop), will now redirect to newblock for (pred_iterator PI = pred_begin(header); PI != pred_end(header); ++PI) { BasicBlock *pred = *PI; if (L->contains(pred)) { continue; } TerminatorInst *termInst = pred->getTerminator(); for (unsigned i = 0; i < termInst->getNumOperands(); i++) {...
2008 Mar 28
8
[LLVMdev] unwinds to in the CFG
...with it was that a lot of optimizations use the dominance tree to decide where it's safe to insert new instructions and it always assumes that if A dom B then an instruction in A is always accessible in B. Here's the new plan. Please poke holes in it. A. redefine the CFG a bit. i. pred_iterator stays the same. ii. succ_iterator only iterates over successors iii. outedge_iterator iterates over successors and the unwind dest There's still some code which refers to outedges by TerminatorInst + unsigned. I can't think of any reason not to replace all of them with outedge_itera...
2008 Jan 02
2
[LLVMdev] immediate predecessors
hi, how to get the number of immediate predecessors for each basic block (arguements of remarks statement at the beginning of the basic block) thank you aditya ____________________________________________________________________________________ Never miss a thing. Make Yahoo your home page. http://www.yahoo.com/r/hs
2011 Feb 01
0
[LLVMdev] Loop simplification
...t(); // Update predecessor PHIs for (BasicBlock::iterator it = pred->begin(); it != pred->end(); ++it) { PHINode *phi = dyn_cast<PHINode>(it); UT_ASSERT(phi); // Adjust the PHI to have the correct incoming block set for (pred_iterator pi = pred_begin(succ); pi != pred_end(succ); ++pi) { // We're a different predecessor than the predecessor block if (*pi != pred) { phi->addIncoming(phi, *pi); } } } // Update s...
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
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. entry -> bb1 -> bb2 -> bb4 -> return | |...
2010 May 04
2
[LLVMdev] Question about GVN
Hello, I was investigating GVN.cpp file and I found suspicious part: 1587 bool NeedToSplitEdges = false; 1588 for (pred_iterator PI = pred_begin(LoadBB), E = pred_end(LoadBB); 1589 PI != E; ++PI) { 1590 BasicBlock *Pred = *PI; 1591 if (IsValueFullyAvailableInBlock(Pred, FullyAvailableBlocks)) { 1592 continue; 1593 } 1594 PredLoads[Pred] = 0; 1595 1596 if (Pred->getTerminator()->getNumS...
2013 Nov 14
1
[LLVMdev] Basic Block Predecessor
All, Is there a fast way to retrieve all of the predecessors to a BasicBlock in a function. Specifically, is there a fast way to iterate through all BasicBlocks which can break to a specific BasicBlock? Thanks, Billy -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131114/aa6220a2/attachment.html>
2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...duced by ProfileInfo. It essentially computes the number of iterations performed by a loop from the profiling information available. The code snippet in my pass looks something like this. BasicBlock *header = loop->getHeader(); ProfileInfo &pi = getAnalysis< ProfileInfo >(); for(pred_iterator i=pred_begin(header), e=pred_end(header); i!=e; ++i) { BasicBlock *pred = *i; const double edgeCount = *pi.getEdgeWeight*( ProfileInfo::Edge(pred,header) ); */* Some code */* } Now, since ProfileInfo has been deprecated and we have PGOInstrumentation passes along with BranchProbab...
2008 May 14
1
[LLVMdev] Useless check in TailDuplication
...ere is no way that Dest can have zero predecessors. By definition, it has at least one: The block containing BI. Is there a point I am missing here, or is this really a useless check? In particular, I'm talking about the following piece of code from lib/Transforms/Scalar/TailDuplication.cpp: pred_iterator PI = pred_begin(Dest), PE = pred_end(Dest); if (PI == PE && Dest != Dest->getParent()->begin()) return false; // It's just a dead block, ignore it... The attached patch removes this check. I can't find any problems with it, it causes no tests to fail. Gr. Matthijs --...
2011 Oct 13
6
[LLVMdev] BasicBlock succ iterator
Hi, All I want to implement DSWP Which is used for parallelization of loops. For this purpose, the loop was replaced with a new basic block in main function. And new functions were created and basic blocks of Loop assigned to them.I have checked blocks and branches for Succ and Pred relation and I have not found any problems. However I get the following error: * **opt:
2018 Aug 15
3
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...ber of iterations >> performed by a loop from the profiling information available. The code >> snippet in my pass looks something like this. >> >> BasicBlock *header = loop->getHeader(); >> ProfileInfo &pi = getAnalysis< ProfileInfo >(); >> for(pred_iterator i=pred_begin(header), e=pred_end(header); i!=e; ++i) >> { >> BasicBlock *pred = *i; >> >> const double edgeCount = *pi.getEdgeWeight*( ProfileInfo::Edge(pred,header) ); >> */* Some code */* >> } >> >> Now, since ProfileInfo has been de...
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
2008 Jan 22
0
[LLVMdev] Walking all the predecessors for a basic block
...gin(BB), E=idf_end(BB); I != E; ++I) { BasicBlock* B = *I; On Jan 22, 2008, at 6:11 AM, Prabhat Kumar Saraswat wrote: > 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. > > entry -> bb1 -> bb2 -> bb4 -> return >...
2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
...a loop from the profiling information available. >>>> The code snippet in my pass looks something like this. >>>> >>>> BasicBlock *header = loop->getHeader(); >>>> ProfileInfo &pi = getAnalysis< ProfileInfo >(); >>>> for(pred_iterator i=pred_begin(header), e=pred_end(header); i!=e; ++i) >>>> { >>>> BasicBlock *pred = *i; >>>> >>>> const double edgeCount = *pi.getEdgeWeight*( ProfileInfo::Edge(pred,header) ); >>>> */* Some code */* >>>> } >...
2008 Jan 23
1
[LLVMdev] Walking all the predecessors for a basic block
...ck* B = *I; > > > > On Jan 22, 2008, at 6:11 AM, Prabhat Kumar Saraswat wrote: > > > 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. > > > > entry ->...
2010 Jun 25
3
[LLVMdev] LLVM:help
How can I get list of its predecessor basic blocks from a basic block? --Rajwinder Singh -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100625/21c52063/attachment.html>