Microarchitectural code analyzers, i.e., tools that estimate the throughput of machine code basic blocks, are important utensils in the tool belt of performance engineers. Recent tools like llvm-mca, uiCA, and Ithemal use a variety of techniques and different models for their throughput predictions. When put to the test, it is common to see these state-of-the-art tools give very different results. These inconsistencies are either errors, or they point to different and rarely documented assumptions made by the tool designers. In this paper, we present AnICA, a tool taking inspiration from differential testing and abstract interpretation to systematically analyze inconsistencies among these code analyzers. Our evaluation shows that AnICA can summarize thousands of inconsistencies in a few dozen descriptions that directly lead to high-level insights into the different behavior of the tools. In several case studies, we further demonstrate how AnICA automatically finds and characterizes known and unknown bugs in llvm-mca, as well as a quirk in AMD's Zen microarchitectures.
翻译:微分分解代码分析器, 即估算机器代码基本块的吞吐量的工具, 是性能工程师工具带中的重要工具。 最近的工具, 如 llvm- mca、 uica 和 Ithemal 等, 使用各种技术和不同的模型来预测其吞吐量。 当被置于测试中时, 常见的是看到这些最先进的工具产生非常不同的结果。 这些不一致是错误, 或者它们指向工具设计者提出的不同且很少有文件记载的假设。 在本文中, 我们介绍了 AnICA, 这是一种从差异测试和抽象解释中获得灵感的工具, 系统地分析这些代码分析器的不一致之处。 我们的评估显示, AnICA 可以在数十个描述中总结出成千上万的不一致之处, 直接导致对工具的不同行为进行高层的洞察。 在几个案例研究中, 我们进一步展示了 AnICA是如何自动发现和描述在 llm- mca 中已知和未知的错误, 以及 AMD 的 Zen 微结构中的一个怪 。