Uniform data dependence info?

Guys,

Is there some uniform way to find data dependence between
two (sets of) instructions? There is use/def data, and
there is AliasAnalysis information, but I am looking for
something more high-level and uniform. I guess I am missing
something, because such interface seems to exist once and
then was abandoned. Any ideas?

    Victor

Is there some uniform way to find data dependence between two (sets of) instructions? There is use/def data, and there is AliasAnalysis information, but I am looking for something more high-level and uniform. I guess I am missing then was abandoned. Any ideas?

Nope, there currently isn't a uniform interface for doing so, at least not at the LLVM level. As you said, use/def information will tell you about dependence between non-side-effecting instructions, and AliasAnalysis will tell you what dependences exist between side-effecting ones.

What are you trying to do here? It would be really easy to add a helper method to the AliasAnalysis interface that took into consideration dependencies between scalar instructions. What specific information do you need?

-Chris

What specific information do you need?

All my experiments eventually analyze or transform
the data dependence graph, which takes into account both
registers and aliasing information. Because there is already
a built-in support for graphs, I hoped there is also built-in
support for data dependence graphs. That would allow, for example,
to display them naturally with dot utility.

      Victor

                      Chris Lattner
                      <sabre@nondot.org To: LLVM Developers Mailing List <llvmdev@cs.uiuc.edu>
                      > cc: Victor Leikehman/Haifa/IBM@IBMIL
                      Sent by: Subject: Re: [LLVMdev] Uniform data dependence info?
                      llvmdev-bounces@c
                      s.uiuc.edu
                                                                                                                                     
                      02/23/05 06:02 PM
                      Please respond to
                      LLVM Developers
                      Mailing List
                                                                                                                                     

Is there some uniform way to find data dependence between two (sets of)
instructions? There is use/def data, and there is AliasAnalysis
information, but I am looking for something more high-level and uniform.
I guess I am missing then was abandoned. Any ideas?

Nope, there currently isn't a uniform interface for doing so, at least not
at the LLVM level. As you said, use/def information will tell you about
dependence between non-side-effecting instructions, and AliasAnalysis will
tell you what dependences exist between side-effecting ones.

What are you trying to do here? It would be really easy to add a helper
method to the AliasAnalysis interface that took into consideration
dependencies between scalar instructions. What specific information do
you need?

-Chris

There currently isn't support for this except in the backends. In the target independent world, there is the SelectionDAG support (include/llvm/Codegen/SelectionDAG*) which is a fairly general DAG framework which will be used for several things (including scheduling in the future), but is still under development. In the SparcV9 backend, there is also support for scheduling graphs (see include/llvm/CodeGen/SchedGraph*). I don't know how Sparc specific these are, but others on this list probably do.

Both graphs can be emitted using DOT, and in general, any graph that you invent yourself can be: just implement the GraphTraits class.

-Chris