This work explores an unexpected application of Implicit Computational Complexity (ICC) to parallelize loops in imperative programs. Thanks to a lightweight dependency analysis, our algorithm allows splitting a loop into multiple loops that can be run in parallel, resulting in gains in terms of execution time similar to state-of-the-art automatic parallelization tools when both are applicable. Our graph-based algorithm is intuitive, language-agnostic, proven correct, and applicable to all types of loops, even if their loop iteration space is unknown statically or at compile time, if they are not in canonical form or if they contain loop-carried dependency. As contributions we deliver the computational technique, proof of its preservation of semantic correctness, and experimental results to quantify the expected performance gains. Our benchmarks also show that the technique could be seamlessly integrated into compiler passes or other automatic parallelization suites. We assert that this original and automatable loop transformation method was discovered thanks to the "orthogonal" approach offered by ICC.
翻译:这项工作探索了隐含计算复杂度( ICC) 的意外应用, 将循环同步化为紧急程序。 通过轻量级依赖性分析, 我们的算法允许将循环分解为多个循环, 可以平行运行, 从而在执行时间上带来收益, 与最先进的自动平行工具相似, 如果两者都适用。 我们基于图形的算法是直观的, 语言不可知的, 证明正确, 并适用于所有类型的循环系统, 即使它们的循环循环循环空间静态或编译时间不为未知, 如果它们不是卡门式的, 或者它们含有环形依赖性。 作为我们提供计算技术的贡献, 证明它保持了语义正确性, 以及实验结果来量化预期的绩效收益。 我们的基准还表明, 该技术可以无缝合地融入编译器或其他自动平行套件。 我们断言, 这种原始和自动循环转换方法是由于 ICC 提供的“ ortogonal” 方法而发现的 。