首页> 美国政府科技报告 >Towards Optimizing Code Generation by Domain-Sensitive Macro Expansion
【24h】

Towards Optimizing Code Generation by Domain-Sensitive Macro Expansion

机译:通过域敏感宏扩展优化代码生成

获取原文

摘要

Many modern code generation methods use tree pattern matching with dynamicprogramming. However, especially in the case of an irregular special-purpose processor architecture their lack of transparancy and stability may be problematic: It is difficult to predict the exact code generation result in advance, and the effects of a modification in the code generation rules may be surprisingly wide. In contrast, macro expansion techniques are intuitively transparent. When global variables are disallowed, macro expansion typically has the Church-Rosser property: the final expansion result is independent of the expansion order of the individal intermediate macro calls. Besides enabling parallel implementation, order-independence means stability: the effects of modifying a macro definition are guaranteed to remain local. In this work a novel assembly-language-level macro expansion technique with both order-independence and rather general context-sensitivity is proposed. The technique supports and modular and hierarchical code libraries. Both a formal model and a code generator prototype demonstrating the technique are presented.

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号