machine learning for code and compiler optimization?
Genetic Programming (GP) has been used to modify source code for performance improvement.

e.g. Evolutionary Improvement of Programs

(This is close to my PhD topic, would be very interested to hear your approach)