request for help on getting started


I intend to write an optimization using LLVM. But before doing that I felt like understanding the tools. I wrote a hello world program to be compiled and executed. But then one of the tutorials suggested using Clang, an other said dragonegg, a third suggested using llvm-gcc. I am confused as to which one to use. Can some one help me in

  1. What are the differences between these three?

  2. Which one best serves my ultimate purpose of developing an machine independent optimizer using LLVM?

  3. Can someone give me step-by-step instructions to compile and execute this simple hello world C program?




I’ll make a start an answering, but the most important thing is that you don’t really say what kind of optimization you’re planning: is it something that only needs LLVM IR, does it need additional semantic information only available at the level of C source? If the latter it will probably require ensuring that at least the source level info gets encoded into the LLVM IR produced.