Displaying 3 results from an estimated 3 matches for "unknowngraphtypeerror".
2008 Jan 23
1
[LLVMdev] Walking all the predecessors for a basic block
...se build (PIC)
/home/saraswat/llvm/llvm-2.1/include/llvm/ADT/GraphTraits.h: In
instantiation of
`llvm::GraphTraits<llvm::ilist_iterator<llvm::BasicBlock> >':
Hello.cpp:59: instantiated from here
/home/saraswat/llvm/llvm-2.1/include/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>&)'
Hell...
2008 Jan 22
0
[LLVMdev] Walking all the predecessors for a basic block
Hi Pabhat,
Have you checked out DepthFirstIterator? (include/llvm/ADT/
DepthFirstIterator.h). It provides an iterator abstraction to perform
a forward/reverse DFS traversal of a graph.
Many of the LLVM datatypes that represent graphs have a template
specialization of the GraphTraits<> class which allows separate
algorithms to treat them as graphs, walk them, etc. (Both BasicBlock
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