Portable compiler optimisation across embedded programs and microarchitectures using machine learning