首页>
外国专利>
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.
展开▼