Lookup table for basicblocks

Hi All,

I need to implement something like a variable for each basic block

How to implement lookup table in LLVM , I think ValueSymbolTable is closest one but how could I do that by it

Hi Rasha,

I need to implement something like a variable for each basic block
How to implement lookup table in LLVM , I think ValueSymbolTable is closest
one but how could I do that by it

The most direct solution is using normal C++ containers.
std::map<BasicBlock*, AllocaInst*> or std::map<BasicBlock*,
GlobalValue*> for example (depending on what kind of variable you
want).

LLVM has some of its own implementations with slightly different
performance characteristics, but there's no reason to learn about
those until you decide you actually need them.

Cheers.

Tim.