跳到正文
EasyXiv 检索
投稿 关于 登录

按回车检索 · 直接输入编号(如 1706.03762)可跳转到论文

计算机科学 > 程序设计语言

arXiv:2003.04228 (cs)
[提交于 2020年2月22日]

标题:Modeling the Invariance of Virtual Pointers in LLVM

作者:Piotr Padlewski, Krzysztof Pszeniczny, Richard Smith
查看论文《Modeling the Invariance of Virtual Pointers in LLVM》的 PDF
查看原文 PDF 中文 PDF (下批处理) EasyResearch 阅读
摘要:Devirtualization is a compiler optimization that replaces indirect (virtual) function calls with direct calls. It is particularly effective in object-oriented languages, such as Java or C++, in which virtual methods are typically abundant. We present a novel abstract model to express the lifetimes of C++ dynamic objects and invariance of virtual table pointers in the LLVM intermediate representation. The model and the corresponding implementation in Clang and LLVM enable full devirtualization of virtual calls whenever the dynamic type is statically known and elimination of redundant virtual table loads in other cases. Due to the complexity of C++, this has not been achieved by any other C++ compiler so far. Although our model was designed for C++, it is also applicable to other languages that use virtual dispatch. Our benchmarks show an average of 0.8% performance improvement on real-world C++ programs, with more than 30% speedup in some cases. The implementation is already a part of the upstream LLVM/Clang and can be enabled with the -fstrict-vtable-pointers flag.
评论: 11 pages, 4 figures
主题: 程序设计语言 (cs.PL); 性能 (cs.PF)
引用方式: arXiv:2003.04228 [cs.PL]
  (或者 arXiv:2003.04228v1 [cs.PL] 对于此版本)
  https://doi.org/10.48550/arXiv.2003.04228

提交历史

来自:Piotr Padlewski
[v1] 2020年2月22日 星期六 12:38:14 UTC
全文链接:

访问论文:

  • 查看原文 PDF
  • 中文 PDF (下批处理)
  • EasyResearch 阅读
  • TeX 源文件
  • arXiv 原文页面
查看许可

当前浏览上下文:

cs.PL
< 上一篇   |   下一篇 >
最新 | 近期 | 2020-02
切换浏览方式为:
cs
cs.PF

参考文献与引用

  • Google Scholar
  • Semantic Scholar

BibTeX 格式的引用

EasyXiv 是独立运营的中文预印本站点,与 arXiv 及康奈尔大学无隶属关系。 论文元数据与原文来自 arXiv.org,感谢 arXiv 提供开放获取服务。
关于 · 帮助 · 投稿指南 · 版权 · arXiv 原站