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)
On Wed, Aug 08, 2012 at 11:24:27 -0600, Ben Bergen wrote:> I apologize if this is an inappropriate question for this mailing > list.This is the correct 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.If you are actually interested in processor registers, I don't think it makes sense to perform this computation at the LLVM IR level. The backend changes the code too much to map such results from the IR to the generated machine code, regardless of the platform. Are you after processor registers? Then the ScheduleDAG you found is the one to use. -- Gergö Barany, research assistant gergo at complang.tuwien.ac.at Institute of Computer Languages http://www.complang.tuwien.ac.at/gergo/ Vienna University of Technology Tel: +43-1-58801-58522 Argentinierstrasse 8/E185, 1040 Wien, Austria Fax: +43-1-58801-18598
Possibly Parallel Threads
- [LLVMdev] Integrated instruction scheduling/register allocation
- [LLVMdev] [Query] Programming Register Allocation
- [LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
- [LLVMdev] Integrated instruction scheduling/register allocation
- [LLVMdev] Integrated instruction scheduling/register allocation