[LLVMdev] LLVM Graph Representation
Andre Tavares
andrelct at dcc.ufmg.br
Mon Jul 6 14:25:36 PDT 2009
Why not use SmallPtrSet instead of std::vector? Isn't there something in
LLVM I can use?
Eli Friedman wrote:
> On Mon, Jul 6, 2009 at 12:32 PM, Andre Tavares<andrelct at dcc.ufmg.br> wrote:
>
>> I was thinking of a list of adjacency, implemented with a
>> map<Instruction, Set<Node>>. The node would have an Instruction and a
>> value. I opted for map and set, because I will create the graph once and
>> will search on it a bunch of times, and will never remove a node.
>>
>
> Something like your proposal (I would suggest more specifically
> llvm::DenseMap<Instruction*, std::vector<node> >) should work
> reasonably well. It's not particularly efficient, though, so if you
> can avoid building an explicit graph, I'd suggest doing that.
>
> -Eli
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>
>
--
Andre Tavares
Master Student in Computer Science - UFMG - Brasil
http://dcc.ufmg.br/~andrelct
More information about the llvm-dev
mailing list