首页> 外国专利> System and Method for Optimizing a Code Section by Forcing a Code Section to be Executed Atomically

System and Method for Optimizing a Code Section by Forcing a Code Section to be Executed Atomically

机译:通过强制以原子方式执行代码段来优化代码段的系统和方法

摘要

Systems and methods for optimizing code may use transactional memory to optimize one code section by forcing another code section to execute atomically. Application source code may be analyzed to identify instructions in one code section that only need to be executed if there exists the possibility that another code section (e.g., a critical section) could be partially executed or that its results could be affected by interference. In response to identifying such instructions, alternate code may be generated that forces the critical section to be executed as an atomic transaction, e.g., using best-effort hardware transactional memory. This alternate code may replace the original code or may be included in an alternate execution path that can be conditionally selected for execution at runtime. The alternate code may elide the identified instructions (which are rendered unnecessary by the transaction) by removing them, or by including them in the alternate execution path.
机译:用于优化代码的系统和方法可以通过强制另一代码部分自动执行来使用事务性存储器来优化一个代码部分。可以分析应用程序源代码以识别一个代码段中的指令,仅在存在另一代码段(例如,关键段)可能被部分执行或者其结果可能受到干扰影响的情况下才需要执行的指令。响应于识别出这样的指令,可以生成替代代码,其例如使用尽力而为硬件交易存储器来强制将关键部分作为原子交易来执行。此替代代码可以替换原始代码,或者可以包含在可以有条件地选择在运行时执行的替代执行路径中。替换代码可以通过删除已标识的指令(或将其包含在事务执行中)来消除已标识的指令,或者通过将它们包含在替代执行路径中来消除它们。

著录项

相似文献

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

客服邮箱:kefu@zhangqiaokeyan.com

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

  • 服务号