[LLVMdev] Creating DAGs

Ben Bergen ben.bergen at gmail.com
Wed Aug 8 10:24:27 PDT 2012


All,

I apologize if this is an inappropriate question for this mailing
list.  If so, please recommend an appropriate place to post the
question.  I'm also somewhat new to LLVM, so I could have some pretty
fundamental misunderstandings about what I am trying to do.  I have
searched for information on the llvm.org website (user's guide,
programmer's manual and doxygen documentation), and looked through the
3.1 source code.  I have also searched the archives of this list.

My question is: Is it possible to create a DAG from an llvm::Module?
I would like to do this independent of a specific architecture using
LLVM IR.  In particular, I am interested in using a DAG to compute the
Strahler number (http://en.wikipedia.org/wiki/Strahler_number) of the
graph to determine the minimum number of register needed to evaluate
an expression tree.

I have read through the documentation on SelectionDAG.  However, this
seems to require a TargetMachine.  Is there a way to create a graph
without a target?  This may be a fundamental lack of understanding on
my part, if so please point me to something that might clarify.

Best Regards,
Ben

--
Dr.-Ing. Benjamin Karl Bergen
Los Alamos National Laboratory
P.O. Box 1663, MS B287
Los Alamos, NM 87545

(505) 465-9316 (m)
(505) 665-4939 (f)



More information about the llvm-dev mailing list