首页> 外国专利> Method and apparatus for using static branch predictions hints with dynamically translated code traces to improve performance

Method and apparatus for using static branch predictions hints with dynamically translated code traces to improve performance

机译:用于将静态分支预测提示与动态翻译的代码痕迹一起使用以提高性能的方法和装置

摘要

A run-time optimization strategy uses a trace picker to identify traces of program code in a native code pool, and a translator to translate the traces into a code cache where the traces are executed natively. Static branch prediction hints are encoded in branch instruction in the translated traces. A program module implementing the present invention is initialized with an empty code cache and a pool of instruction in a native code pool. The trace picker analyzes the instructions in the native code pool and identifies traces of instructions that tend to be executed as a group. When a trace is identified, basic blocks lying along the trace path are translated into a code cache, with static branch predictions encoded into the branch instructions of the basic blocks based on branching behavior observed when the trace is identified. Control then passes to the basic blocks in the code cache, and the basic blocks in the code cache are executed natively using the static branch prediction hints encoded into the branch instructions.
机译:运行时优化策略使用跟踪选择器来识别本机代码池中的程序代码的跟踪,并使用翻译器将跟踪转换为代码缓存,并在其中执行跟踪。静态分支预测提示在转换后的跟踪中的分支指令中进行编码。用空代码高速缓存和本机代码池中的指令池初始化实现本发明的程序模块。跟踪选择器分析本机代码池中的指令,并标识易于成组执行的指令跟踪。识别出跟踪时,将沿跟踪路径放置的基本块转换为代码缓存,并根据识别出跟踪时观察到的分支行为,将静态分支预测编码为基本块的分支指令。然后,控制传递到代码缓存中的基本块,并使用编码到分支指令中的静态分支预测提示来本地执行代码缓存中的基本块。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号