search for: const_pred_iterator

Displaying 4 results from an estimated 4 matches for "const_pred_iterator".

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 of the current block for (const_pred_iterator pr=pred_begin(b), esc=pred_end(b); pr!=esc; ++pr) { const BasicBlock *p = pr; // ************error lin...
2011 Jan 31
0
[LLVMdev] How to convert an iterator to an object pointer
...s 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 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 of the current block > for (const_pred_iterator pr=pred_begin(b), esc=pred_end(b); pr!=esc; > ++pr) > { const BasicBlock *p = pr...
2006 Jul 05
0
[LLVMdev] Critical edges
...se; for(MachineBasicBlock::const_succ_iterator succ = src.succ_begin(); succ != src.succ_end(); succ++) { num_succ++; if(num_succ > 1) { src_has_many_succ = true; break; } } for(MachineBasicBlock::const_pred_iterator pred = dst.pred_begin(); pred != dst.pred_end(); pred++) { num_pred++; if(num_pred > 1) { dst_has_many_pred = true; break; } } return src_has_many_succ && dst_has_many_pred; } void CriticalEd...
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