Learning to Schedule Straight-Line Code