search for: idf_begin

Displaying 3 results from an estimated 3 matches for "idf_begin".

Did you mean: df_begin
2008 Jan 23
1
[LLVMdev] Walking all the predecessors for a basic block
...llvm/ADT/GraphTraits.h:57: error: no type named `UnknownGraphTypeError' in `class llvm::ilist_iterator<llvm::BasicBlock>' Hello.cpp: In member function `virtual bool <unnamed>::Hello::runOnFunction(llvm::Function&)': Hello.cpp:59: error: no matching function for call to `idf_begin(llvm::ilist_iterator<llvm::BasicBlock>&)' Hello.cpp:59: error: no matching function for call to `idf_end(llvm::ilist_iterator<llvm::BasicBlock>&)' My source code for this pass is below: #include "llvm/Support/CFG.h" #include "llvm/ADT/DepthFirstIterator...
2008 Jan 22
0
[LLVMdev] Walking all the predecessors for a basic block
...y datatype that has a specialization of GraphTrait. For your particular task, I *think* you would do the following (someone else please correct me if I am wrong): #include "llvm/Support/CFG.h" #include "llvm/ADT/DepthFirstIterator.h" for (idf_iterator<BasicBlock*> I=idf_begin(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 (pre...
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