An introduction to polyhedral compilation, with a worked example showing how you compute relevant linear transforms: https://www.youtube.com/watch?v=iAF-orse4hE