利用 LLVM 的 ScalarEvolution 进行符号化数据缓存分析
Leveraging LLVM's ScalarEvolution for Symbolic Data Cache Analysis
AI总结:
本文提出符号化控制流图及符号化数据缓存分析,利用 LLVM 的 ScalarEvolution 捕获动态内存行为,在准确性和运行时间上均优于经典 LRU 必须分析。
摘要:
虽然指令缓存分析本质上已是一个已解决的问题,但数据缓存分析更具挑战性。与指令获取不同,内存指令生成的数据访问可能随程序输入而变化,并且在循环中同一指令的动态出现之间也可能不同。我们观察到,经典缓存分析中采用的普通控制流图(CFG)抽象不足以捕获内存指令的动态行为。在普通控制流图之上,对底层程序的缓存行为进行准确分析是不可能的。因此,我们的第一个贡献是定义了一种更具表现力的程序抽象,称为符号化控制流图,它可以从 LLVM 的 ScalarEvolution 分析中获得。为了利用这种更丰富的抽象,我们的主要贡献是开发了符号化数据缓存分析,这是经典 LRU 必须分析从普通控制流图到符号化控制流图的平滑推广。实验评估表明,符号化数据缓存分析在准确性和分析运行时间方面始终优于经典 LRU 必须分析。
英文摘要:
While instruction cache analysis is essentially a solved problem, data cache analysis is more challenging. In contrast to instruction fetches, the data accesses generated by a memory instruction may vary with the program's inputs and across dynamic occurrences of the same instruction in loops. We observe that the plain control-flow graph (CFG) abstraction employed in classical cache analyses is inadequate to capture the dynamic behavior of memory instructions. On top of plain CFGs, accurate analysis of the underlying program's cache behavior is impossible. Thus, our first contribution is the definition of a more expressive program abstraction coined symbolic control-flow graphs, which can be obtained from LLVM's ScalarEvolution analysis. To exploit this richer abstraction, our main contribution is the development of symbolic data cache analysis, a smooth generalization of classical LRU must analysis from plain to symbolic control-flow graphs. The experimental evaluation demonstrates that symbolic data cache analysis consistently outperforms classical LRU must analysis both in terms of accuracy and analysis runtime.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。