V2EX  ›  英汉词典

Constant Propagation

释义 Definition

(编译器/程序优化)常量传播:一种静态优化技术,把已知为常量的变量值在程序的后续使用处“传播/替换”为该常量,从而简化表达式、暴露更多可优化机会(常与常量折叠一起使用)。在某些语境下也可泛指把“恒定信息”在计算过程中传递下去。

发音 Pronunciation (IPA)

/ˈkɒnstənt ˌprɒpəˈɡeɪʃən/

例句 Examples

After constant propagation, the compiler replaced x with 10 everywhere it was safe.
经过常量传播后,编译器在所有安全的位置把 x 都替换成了 10

Constant propagation can reduce runtime checks by turning dependent conditions into compile-time constants.
常量传播可以把依赖变量的条件变成编译期常量,从而减少运行时检查。

词源 Etymology

constant 来自拉丁语 constans(“坚定的、不变的”);propagation 来自拉丁语 propagare(“繁殖、扩展、传播”)。组合起来字面意思是“传播不变的值”,在编译原理中专指把“已确定的常量信息”沿控制流/数据流传递并用于替换。

相关词 Related Words

文学与著作 Literary Works

  • Compilers: Principles, Techniques, and Tools(Aho, Lam, Sethi, Ullman,“龙书”)——在数据流优化章节讨论常量传播/常量折叠等经典优化。
  • Engineering a Compiler(Cooper & Torczon)——以实现视角介绍常量传播在优化流水线中的位置。
  • Advanced Compiler Design and Implementation(Steven Muchnick)——更系统地覆盖数据流框架与常量传播等优化。
  • Modern Compiler Implementation 系列(Andrew W. Appel)——在中间表示与优化部分出现相关处理与示例。
关于   ·   帮助文档   ·   自助推广系统   ·   博客   ·   API   ·   FAQ   ·   Solana   ·   760 人在线   最高记录 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 10ms · UTC 22:00 · PVG 06:00 · LAX 14:00 · JFK 17:00
♥ Do have faith in what you're doing.