Compiler Assisted Runtime Adaptation