Value profiling

Value profiling
复制标题

价值剖析

DOI:
10.1109/micro.1997.645816
复制
发表时间:
1997
期刊:
Proceedings of 30th Annual International Symposium on Microarchitecture
影响因子:
--
通讯作者:
A. Eustace
A. Eustace
中科院分区:
--
文献类型:
--
作者:
B. Calder;P. Feller;A. Eustace

文献摘要

被引文献

相似文献

将变量识别为不变的或在编译时的常数,可以使编译器执行优化,包括恒定折叠,代码专业化和部分评估。某些不能将其标记为常数的变量可能表现出半不变的行为。半不变变量是一个不能在编译时识别为常数的变量,但在运行时具有高度的不变行为。如果可以使用运行时信息以将这些变量识别为半不变,则它们可以从基于不变的编译器优化中受益。我们检查了从分析指令值中发现的不变性,并表明许多指令甚至在不同输入之间都具有半不变的值。我们还研究了仅通过分析负载指令来估算程序中所有说明的不变性的能力。此外,我们提出了一种称为收敛分析的新类型。估计负载和收敛谱分析的不变性用于减少生成准确值曲线所需的分析时间。然后,该值配置文件可自动指导代码生成以进行动态编译,自适应执行,代码专业化,部分评估和其他编译器优化。
Identifying variables as invariant or constant at compile-time allows the compiler to perform optimizations including constant folding, code specialization, and partial evaluation. Some variables, which cannot be labeled as constants, may exhibit semi-invariant behavior. A semi-invariant variable is one that cannot be identified as a constant at compile-time, but has a high degree of invariant behavior at run-time. If run-time information was available to identify these variables as semi-invariant, they could then benefit from invariant-based compiler optimizations. We examine the invariance found from profiling instruction values, and show that many instructions have semi-invariant values even across different inputs. We also investigate the ability to estimate the invariance for all instructions in a program from only profiling load instructions. In addition, we propose a new type of profiling called convergent profiling. Estimating the invariance from loads and convergent profiling are used to reduce the profiling time needed to generate an accurate value profile. The value profile can then be used to automatically guide code generation for dynamic compilation, adaptive execution, code specialization, partial evaluation and other compiler optimizations.