...
【24h】

Generalized instruction selection using SSA-graphs

机译:使用SSA图进行通用指令选择

获取原文
获取原文并翻译 | 示例
   

获取外文期刊封面封底 >>

       

摘要

Instruction selection is a well-studied compiler phase that translates the compiler's intermediate representation of programs to a sequence of target-dependent machine instructions optimizing for various compiler objectives (e. g. speed and space). Most existing instruction selection techniques are limited to the scope of a single statement or a basic block and cannot cope with irregular instruction sets that are frequently found in embedded systems. We consider an optimal technique for instruction selection that uses Static Single Assignment (SSA) graphs as an intermediate representation of programs and employs the Partitioned Boolean Quadratic Problem (PBQP) for finding an optimal instruction selection. While existing approaches are limited to instruction patterns that can be expressed in a simple tree structure, we consider complex patterns producing multiple results at the same time including pre/post increment addressing modes, div-mod instructions, and SIMD extensions frequently found in embedded systems. Although both instruction selection on SSA-graphs and PBQP are known to be NP-complete, the problem can be solved efficiently-even for very large instances. Our approach has been implemented in LLVM for an embedded ARMv5 architecture. Extensive experiments show speedups of up to 57% on typical DSP kernels and up to 10% on SPECINT 2000 and MiBench benchmarks. All of the test programs could be compiled within less than half a minute using a heuristic PBQP solver that solves 99.83% of all instances optimally.
机译:指令选择是一个经过充分研究的编译器阶段,它将编译器的程序中间表示转换为针对各种编译器目标(例如速度和空间)优化的一系列目标相关的机器指令。大多数现有的指令选择技术仅限于单个语句或基本块的范围,并且不能应付嵌入式系统中经常出现的不规则指令集。我们考虑一种用于指令选择的最佳技术,该技术使用静态单一分配(SSA)图作为程序的中间表示,并采用分区布尔二次问题(PBQP)来查找最佳指令选择。尽管现有方法仅限于可以用简单树形结构表示的指令模式,但我们认为复杂模式可以同时产生多个结果,包括嵌入式系统中常见的前/后增量寻址模式,div-mod指令和SIMD扩展。尽管已知在SSA图和PBQP上的指令选择都是NP完全的,但即使对于非常大的实例,也可以有效地解决该问题。我们的方法已在LLVM中针对嵌入式ARMv5架构实现。大量的实验表明,在典型的DSP内核上,速度最多可提高57%,在SPECINT 2000和MiBench基准上,最高可提高10%。可以使用启发式PBQP求解器在不到半分钟的时间内编译所有测试程序,该求解器可以最佳地解决所有实例的99.83%。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号