首页> 外国专利> COMPILER OPTIMISATION LIKE IDIOM RECOGNITION THROUGH PATTERN MATCHING USING VALUE NUMBERING

COMPILER OPTIMISATION LIKE IDIOM RECOGNITION THROUGH PATTERN MATCHING USING VALUE NUMBERING

机译:通过值匹配通过模式匹配实现对偶像识别的编译器优化

摘要

A compiler and method for compiling source code comprising: a library of code patterns and control flow information for each code pattern, wherein each code pattern comprises one or more variable; and a processor arranged to: evaluate the control flow of an expression in the source code, wherein the expression comprises one or more variable, match the expression to one of the code patterns in the library based on the evaluated control flow information, assign value numbers to the one or more variable within the expression, determine if the expression and the matched code pattern are equivalent based on the assigned value numbers, and replace the expression in the source code with a replacement expression if the expression and the matched code pattern are equivalent.
机译:一种用于编译源代码的编译器和方法,包括:代码模式库和用于每个代码模式的控制流信息,其中,每个代码模式包括一个或多个变量;处理器和处理器,用于:评估源代码中的表达式的控制流,其中该表达式包括一个或多个变量,基于所评估的控制流信息,将该表达式与库中的代码模式之一进行匹配,分配值编号表达式中的一个或多个变量,根据分配的数值确定表达式和匹配的代码模式是否等效,如果表达式和匹配的代码模式等效,则用替换表达式替换源代码中的表达式。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号