search for: directed_graph

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

2010 Mar 26
3
[LLVMdev] Why is BasicBlock's copy constructor private?
...traversal for its CFGs, but I need additional operations, such as iterating over the edges. I thought I would solve this problem using the Boost graph library. It should be relatively simple to walk an LLVM CFG and add the BasicBlock objects to a Boost graph declared as: typedef boost::directed_graph<llvm::BasicBlock> Graph; Once constructed, this automatically gives me access to all kinds of sophisticated graph routines. Unfortunately, the above code doesn't compile because Boost apparently needs the class to have a copy constructor, and BasicBlock's copy constructor is p...
2010 Mar 26
0
[LLVMdev] Why is BasicBlock's copy constructor private?
...d by pointer and refer to their arguments by pointer, so copying them would mean intelligently updating the instruction arguments, which is likely infeasible. Given that LLVM is already managing the memory and presumably will do so for the life of your graph processing, could you just use a boost::directed_graph<llvm::BasicBlock*> instead? Alternatively, perhaps you want "external adaptation" as described in http://www.boost.org/doc/libs/1_42_0/libs/graph/doc/leda_conversion.html HTH, ~ Scott
2010 Mar 26
2
[LLVMdev] Why is BasicBlock's copy constructor private?
On Mar 25, 2010, at 5:23 PM, me22 wrote: > Given that LLVM is already managing the memory and presumably will do > so for the life of your graph processing, could you just use a > boost::directed_graph<llvm::BasicBlock*> instead? Yeah, that was one of the first things I tried: for (Function::iterator i = function.begin(), e = function.end(); i != e; ++i) { BasicBlock *basicBlockPtr = &(*i); add_vertex(basicBlockPtr, timingGraph); } The "&(*i)" sure seems weird, but...