similar to: [LLVMdev] the pred_begin and pred_end of BasicBlock

Displaying 20 results from an estimated 4000 matches similar to: "[LLVMdev] the pred_begin and pred_end of BasicBlock"

2005 Jan 13
2
[LLVMdev] the pred_begin and pred_end of BasicBlock
Sorry, still a bit confused. Say we have two basic blocks: A and B. B has a label. There is no branch/control flow instructions explicit uses B. like this: A: code sequence does not contain br/other control flow instruction B: lable_of_b: code sequence Is A still a predecessor of B? Thanks. Chris Lattner wrote: > On Thu, 13 Jan 2005, Zhou Feng wrote: > >> hi, >> I'm
2005 Jan 13
0
[LLVMdev] the pred_begin and pred_end of BasicBlock
On Thu, 13 Jan 2005, Zhou Feng wrote: > hi, > I'm a bit confused by the pred_begin/end of BasicBlock in CFG.h. I cann't > understand what is a **use** of a BasicBlock. Also, I have no idea of when > CFG would be constructed in LLVM. The CFG is always implicit in LLVM. The two things that "use" BasicBlocks are branch/control flow instructions and PHI nodes.
2004 Oct 25
5
[LLVMdev] Some Questions about LLVM
hi, all I have some questions about LLVM 1. I recently compiled LLVM on my X86 machine correctly. But when I use the built LLVm compiling programs(in the getting started guide), I got an warning saying can not find library "lc" (something like that). Yet LLVM did yeild a execution native code and it runs correctly except with a waring saying something like "__main**"(I
2004 Oct 27
2
[LLVMdev] Some Questions about LLVM
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta content="text/html;charset=GB2312" http-equiv="Content-Type"> <title></title> </head> <body bgcolor="#ffffff" text="#000000"> Yes, I checked that envvar, and it is set.<br> The error msg when compiling a .c
2004 Oct 25
0
[LLVMdev] Some Questions about LLVM
On Mon, 25 Oct 2004, zhou feng wrote: > I have some questions about LLVM > 1. I recently compiled LLVM on my X86 machine correctly. But when I use > the built LLVm compiling programs(in the getting started guide), I got > an warning saying can not find library "lc" (something like that). Yet > LLVM did yeild a execution native code and it runs correctly except with > a
2011 Oct 14
0
[LLVMdev] BasicBlock succ iterator
Hi I have checked 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) {
2011 Jan 31
3
[LLVMdev] How to convert an iterator to an object pointer
I have a pointer to a basic block and am iterating thru its predecessor blocks. I want to get a pointer to the predecessor block. How do I do it. I am using following code and it given compile time errors. error: cannot convert 'llvm::const_pred_iterator' to 'const llvm::BasicBlock*' in initialization const BasicBlock *b = PH->getParent(); // process all pred block
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; //
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:
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
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
2010 Jun 25
0
[LLVMdev] LLVM:help
On 25/06/10 06:05, RAJWINDER SINGH wrote: > How can I get list of its predecessor basic blocks from a basic block? If BB is a BasicBlock*, you can get begin and end iterators using pred_begin(BB) and pred_end(BB). Ciao, Duncan.
2011 Jan 31
0
[LLVMdev] How to convert an iterator to an object pointer
Hi Surinder, You'll need to dereference your iterator to get a pointer: const BasicBlock *p = *pr; Cheers, Lang. On Mon, Jan 31, 2011 at 3:04 PM, Surinder <surifilms at gmail.com> wrote: > I have a pointer to a basic block and am iterating thru its > predecessor blocks. I want to get a pointer to the predecessor block. > How do I do it. I am using following code and it
2008 May 14
1
[LLVMdev] Useless check in TailDuplication
Hi, while reading the TailDuplication pass, I found a check that looks rather pointless. TailDuplication looks at an unconditional branch instruction, BI. It performs a number of checks on the successor of this branch instruction, Dest. One of this checks is counting the number of predecessor. If this count is zero, Dest is regarded as dead and no tail duplication happens. However, as far as I
2018 Aug 15
2
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
Hey all, I have a piece of code (written in LLVM 2.8) which uses profiling results produced 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
2019 Oct 30
2
How to make ScalarEvolution recompute SCEV values?
Hello all, I’m pretty new to LLVM. I'm writing a pass for loop optimization. I clone and rearrange loops, setting the cloned loop as the original loop’s parent. This can be done multiple times, until there is no more work to do. The trouble is, after the first time I do this, the cloned loop's SCEVs become unknown types when they should be AddRecExpr. If I re-run the whole pass on the
2015 Jun 12
2
[LLVMdev] How to insert basic block in a loop
Dear All I'm making a transformation pass that inserts a new basic block at the start of a loop. However when I try to change predecessor/successor relations, it does not consider the new block in the loop at all. So I got that just inserting a loop in a function before another loop is not enough. So how exactly to do this job? Regards, Marwa Yusuf Teaching Assistant - Computer Engineering
2010 Apr 07
2
[LLVMdev] graph abstraction proposal
Hi! while trying to use llvm::DominatorTreeBase on a custom graph that has nothing to do with llvm::BasicBlock I ran into some difficulties, because llvm::DominatorTreeBase calls e.g. getParent()->front() directly on the nodes and uses llvm::Inverse which forced me to implement my GraphTraits also for Inverse. This could be solved using a compile time abstraction of Graph instread of
2017 May 01
4
RFC: Stop using redundant PHI node entries for multi-edge predecessors
Hi, On Mon, May 1, 2017 at 8:47 AM, Daniel Berlin via llvm-dev <llvm-dev at lists.llvm.org> wrote: >> Today, the IR requires that if you have multiple edges from A to B >> (typically with a switch) any phi nodes in B must have an equal number of >> entries for A, but that all of them must have the same value. > >> This seems rather annoying.... >> 1) It
2018 Aug 15
3
Queries Regarding Usage of PGOInstrumentation Passes instead of Deprecated ProfileInfo
Thank you so much for your response. On Wed, Aug 15, 2018 at 3:08 PM, Xinliang David Li <xinliangli at gmail.com> wrote: > > > On Wed, Aug 15, 2018 at 7:36 AM Malhar Thakkar via llvm-dev < > llvm-dev at lists.llvm.org> wrote: > >> Hey all, >> >> I have a piece of code (written in LLVM 2.8) which uses profiling results >> produced by ProfileInfo.