If you're not looking to implement one totally from scratch, this could be a good start: http://llvm.org/docs/tutorial/
One thing that helped get started was slides from a CMU class. Hang on:
https://www.cs.cmu.edu/~15745/syllabus.html
Excellent work and so nice of them to post it for free.