[LLVMdev] aid for getting started

Terence Parr parrt at cs.usfca.edu
Tue Apr 22 14:30:28 PDT 2008


Hi, I've been spending hours looking for example language -> IR  
translations so I can learn more about the IR.  I also looked for a  
simple-to-setup project that would give the samples.  Finally, I  
downloaded list archives (are they visible to google?) and scanned.   
Found -emit-llvm option on llvm-gcc.  This is your friend.  It answers  
"how do I represent x in IR?". E.g.,

/usr/local/llvm-gcc4.2-2.2-x86-darwin8/bin/llvm-gcc -emit-llvm -S -c  
play.c

play.s says it all.  Probably good for getting started doc.

Hooray :)

Ter



More information about the llvm-dev mailing list