[LLVMdev] Control dependence pass

funceval funceval at gmail.com
Mon Oct 26 14:52:20 PDT 2009


Hi,

I have written a pass to find the control dependences. Right now I am
using a map of of basic blocks to vectors of basic blocks to store the
dependences, so the dependence is represented in terms of basic
blocks. Before I submit the patch for review, I wanted to know the
format in which control dependences should be stored.

1) Should the dependence information be instead represented in terms
of instructions? This is how I plan to do in terms of instructions -
if basic block bb1 is control dependent on basic block bb2, then all
instructions in bb1 are dependent on the compare instruction in bb2.
2) Shall I provide an additional wrapper class to get the dependence
information in terms of instructions?
3) Is the STL map good enough for storing and retrieving the
dependence information?

Thanks



More information about the llvm-dev mailing list