A tutorial series explaining how Devito lowers symbolic equations into executable code is available here. This tutorial, however, is still work-in-progress; contributions are welcome.
A paper describing the architecture of the Devito compiler is freely available on Arxiv. This has been submitted to ACM TOMS and is currently under review.