paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Challenging Sequential Bitstream Processing via Principled Bitwise Speculation

以原则性按位推测应对顺序比特流处理
ASPLOS Proceedings of the Twenty-Fifth International Conference on Architectural Support for Programming Languages and Operating Systems2020匹配度 2/10 · 论文属于编译/程序分析领域,使用静态分析与有限状态机建模来并行化比特流处理,与用户关注的PL技术有微弱重叠;但完全不涉及LLM/Agent、浮点程序分析或贝叶斯程序分析,与研究方向核心(PL与AI交叉)无关。引用 9 inbox
Junqiao Qiu, Lin Jiang, Zhijia Zhao
crossref: 2026-09-12

AI 速览

一句话:提出原则性按位推测(PBS),通过将比特流程序建模为有限状态机来打破依赖并并行化顺序比特流处理。

许多性能关键应用(如多媒体处理、位图索引)以逐位计算遍历比特流,但逐位计算携带依赖时,整个遍历变得串行,从根本上限制了可扩展性。本文提出原则性按位推测(PBS),其核心类比是比特流程序与顺序电路均变换二进制序列,因此可用有限状态机(FSM)建模比特流程序中的依赖。PBS通过一组静态分析将程序推理到比特级,识别导致依赖的位,并将依赖位的取值组合视为状态来构造FSM;进而利用FSM状态收敛以更高准确率预测依赖位取值,并借助FSM推测技术并行化比特流程序。预测失败时,PBS基于按位逻辑直接修正错误输出,最小化误推测开销。作者用LLVM实现原型,在真实比特流程序上评估,在多核/众核机器上获得最高接近线性的加速。

问题
比特流程序中的逐位计算常因依赖关系导致整个遍历串行化,限制了在多核上的可扩展性。
方法
PBS将比特流程序类比为顺序电路,通过静态分析定位引起依赖的位,用有限状态机建模依赖并在状态收敛时推测依赖位取值,失败时按位修正输出错误。
评估
作者在LLVM上实现PBS原型,在真实比特流程序上评估,于多核/众核机器上取得最高接近线性的加速。
原文摘要(Abstract)

Many performance-critical applications traverse bitstreams with bitwise computations for better performance or higher space efficiency, such as multimedia processing and bitmap indexing. However, when these bitwise computations carry dependences, the entire bitstream traversal becomes serial, fundamentally limiting the scalability. In this work, we show that bitstream-carried dependences are actually "breakable" in many cases, with the adoption of a systematic treatment - principled bitwise speculation (PBS). The core idea of PBS stems from an analogy drawn between bitstream programs and sequential circuits, both of which transform binary sequences. In this new perspective, it becomes natural to model the dependences in bitstream programs with finite-state machines (FSM), a basic model for sequential circuits. To achieve this, PBS features an assembly of static analyses that reason about bitstream programs down to the bit level to identify the bits causing dependences, then it treats the value combinations of dependent bits as states to construct FSMs. The modeling, for the first time, enables the use of FSM speculation techniques to parallelize bitstream programs. Basically, by leveraging the state convergence of FSMs, the values of dependent bits can be predicted with much higher accuracies. In cases the prediction fails, PBS tries to directly "rectify" the wrong outputs based on bitwise logic, minimizing the mis-speculation costs. In addition, FSM shows even higher execution efficiency than the original program in some cases, making itself an optimized version to accelerate serial bitstream processing. We prototyped PBS using LLVM. Evaluation with real-world bitstream programs confirms the effectiveness of PBS, showing up to near-linear speedup on multicore/manycore machines.

链接与引用

DOI 原文 · PDF(开放获取) ·

BibTeX
@inproceedings{paperbot5471,
  title = {Challenging Sequential Bitstream Processing via Principled Bitwise Speculation},
  author = {Junqiao Qiu and Lin Jiang and Zhijia Zhao},
  booktitle = {ASPLOS},
  year = {2020},
  doi = {10.1145/3373376.3378461}
}