A Compiler-Based Framework For Automatic Extraction Of Program Skeletons For Exascale Hardware/Software Co-Design