search for: idf_end

Displaying 5 results from an estimated 5 matches for "idf_end".

Did you mean: df_end
2008 Jan 23
1
[LLVMdev] Walking all the predecessors for a basic block
...Block>' 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.h" #include "llvm/ADT/GraphTraits.h" virtual bool runOnFunction(Function& F) { //for e...
2008 Jan 22
0
[LLVMdev] Walking all the predecessors for a basic block
...as 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 (pred_iterator PI =...
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
2007 Mar 18
4
[LLVMdev] idf_iterator and MachineFunctions
...first block in the function at present, rather than the last one (because of the specialisiation of GraphTraits for Inverse<MachineFunction*> - getEntryNode returns mf->front()). That seems odd to me - you can only ever get to the first block with it (incrementing the iterator once yields idf_end(mf), and there's no decrement operation). Is this behaviour intentional? If it is I'll need to write some inverse iteration functions myself. Is there a recommended way to find the final block (the one with successors={}) in a machine function? (will mf->back() always return it?) Tha...
2007 Mar 19
0
[LLVMdev] idf_iterator and MachineFunctions
...function at present, rather than the last one > (because of the specialisiation of GraphTraits for > Inverse<MachineFunction*> - getEntryNode returns mf->front()). That > seems odd to me - you can only ever get to the first block with it > (incrementing the iterator once yields idf_end(mf), and there's no > decrement operation). That seems odd to me too. It sounds like Inverse<MF*> should be removed. -Chris -- http://nondot.org/sabre/ http://llvm.org/