首页> 外文OA文献 >Search-based Optimization for Compiler Machine-code Generation
【2h】

Search-based Optimization for Compiler Machine-code Generation

机译:基于搜索的编译器机器代码生成优化

摘要

Compilation encompasses many steps. Parsing turns the input program into a more manageable syntax tree. Verification ensures that the program makes some semblance of sense. Finally, code generation transforms the internal abstract program representation into an executable program. Compilers strive to produce the best possible programs. Optimizations are applied at nearly every level of compilation. Instruction Scheduling is one of the last compilation tasks. It is part of code generation. Instruction Scheduling replaces the internal graph representation of the program with an instruction sequence. The scheduler should produce some sequence that the hardware can execute quickly. Considering that Instruction Scheduling is an NP-Complete optimization problem, it is interesting that schedules are usually generated by a greedy, heuristic algorithm called List Scheduling. Given search-based algorithms' successes in other NP-Complete optimization domains, we ask whether search-based algorithms can be applied to Instruction Scheduling to generate superior schedules without unacceptably increasing compilation time. To answer this question, we formulate a problem description that captures practical scheduling constraints. We show that this problem is NP-Complete given modest requirements on the actual hardware. We adapt three different search algorithms to Instruction Scheduling in order to show that search is an effective Instruction Scheduling technique. The schedules generated by our algorithms are generally shorter than those generated by List Scheduling. Search-based scheduling does take more time, but the increases are acceptable for some compilation domains.
机译:编译包含许多步骤。解析将输入程序变成一个更易于管理的语法树。验证可确保程序具有某种外观。最后,代码生成将内部抽象程序表示形式转换为可执行程序。编译器努力产生最好的程序。优化几乎适用于所有编译级别。指令调度是最后的编译任务之一。它是代码生成的一部分。指令调度用指令序列替换程序的内部图形表示。调度程序应产生一些可以使硬件快速执行的序列。考虑到指令调度是一个NP-完全优化问题,有趣的是,调度通常是由一种称为列表调度的贪婪启发式算法生成的。考虑到基于搜索的算法在其他NP-Complete优化领域中的成功,我们询问是否可以将基于搜索的算法应用于指令调度以生成更好的调度,而又不增加编译时间。为了回答这个问题,我们制定了一个描述实际调度约束的问题描述。我们表明,在实际硬件上的适度要求下,此问题是NP-Complete的。为了说明搜索是一种有效的指令调度技术,我们对指令调度采用了三种不同的搜索算法。我们的算法生成的时间表通常比列表调度生成的时间表短。基于搜索的调度确实花费更多时间,但是对于某些编译域而言,这种增加是可接受的。

著录项

  • 作者

    Clauson Aran;

  • 作者单位
  • 年度 2013
  • 总页数
  • 原文格式 PDF
  • 正文语种 en_US
  • 中图分类

相似文献

  • 外文文献
  • 中文文献
  • 专利

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号