TreeFuser: a framework for analyzing and fusing general recursive tree traversals

Author:

Sakka Laith1,Sundararajah Kirshanthan1,Kulkarni Milind1

Affiliation:

1. Purdue University, USA

Abstract

Series of traversals of tree structures arise in numerous contexts: abstract syntax tree traversals in compiler passes, rendering traversals of the DOM in web browsers, kd-tree traversals in computational simulation codes. In each of these settings, a tree is traversed multiple times to compute various values and modify various portions of the tree. While it is relatively easy to write these traversals as separate small updates to the tree, for efficiency reasons, traversals are often manually fused to reduce the number of times that each portion of the tree is traversed: by performing multiple operations on the tree simultaneously, each node of the tree can be visited fewer times, increasing opportunities for optimization and decreasing cache pressure and other overheads. This fusion process is often done manually, requiring careful understanding of how each of traversals of the tree interact. This paper presents an automatic approach to traversal fusion: tree traversals can be written independently, and then our framework analyzes the dependences between the traversals to determine how they can be fused to reduce the number of visits to each node in the tree. A critical aspect of our framework is that it exploits two opportunities to increase the amount of fusion: i) it automatically integrates code motion, and ii) it supports partial fusion, where portions of one traversal can be fused with another, allowing for a reduction in node visits without requiring that two traversals be fully fused. We implement our framework in Clang, and show across several case studies that we can successfully fuse complex tree traversals, reducing the overall number of traversals and substantially improving locality and performance.

Funder

National Science Foundation

U.S. Department of Energy

Publisher

Association for Computing Machinery (ACM)

Subject

Safety, Risk, Reliability and Quality,Software

Reference46 articles.

1. Beyond Iteration Vectors: Instancewise Relational Abstract Domains

2. A practical automatic polyhedral parallelizer and locality optimizer

3. Safe fusion of functional expressions

4. H. Comon M. Dauchet R. Gilleron C. Löding F. Jacquemard D. Lugiez S. Tison and M. Tommasi. 2007. Tree Automata Techniques and Applications. Available on: http://www.grappa.univ- lille3.fr/tata . (2007). release October 12th 2007. H. Comon M. Dauchet R. Gilleron C. Löding F. Jacquemard D. Lugiez S. Tison and M. Tommasi. 2007. Tree Automata Techniques and Applications. Available on: http://www.grappa.univ- lille3.fr/tata . (2007). release October 12th 2007.

Cited by 11 articles. 订阅此论文施引文献 订阅此论文施引文献,注册后可以免费订阅5篇论文的施引文献,订阅后可以查看论文全部施引文献

1. Superfusion: Eliminating Intermediate Data Structures via Inductive Synthesis;Proceedings of the ACM on Programming Languages;2024-06-20

2. Mechanised Hypersafety Proofs about Structured Data;Proceedings of the ACM on Programming Languages;2024-06-20

3. Orchard: Heterogeneous Parallelism and Fine-grained Fusion for Complex Tree Traversals;ACM Transactions on Architecture and Code Optimization;2024-05-21

4. UniRec: a unimodular-like framework for nested recursions and loops;Proceedings of the ACM on Programming Languages;2022-10-31

5. Tree traversal synthesis using domain-specific symbolic compilation;Proceedings of the 27th ACM International Conference on Architectural Support for Programming Languages and Operating Systems;2022-02-22

同舟云学术

1.学者识别学者识别

2.学术分析学术分析

3.人才评估人才评估

"同舟云学术"是以全球学者为主线,采集、加工和组织学术论文而形成的新型学术文献查询和分析系统,可以对全球学者进行文献检索和人才价值评估。用户可以通过关注某些学科领域的顶尖人物而持续追踪该领域的学科进展和研究前沿。经过近期的数据扩容,当前同舟云学术共收录了国内外主流学术期刊6万余种,收集的期刊论文及会议论文总量共计约1.5亿篇,并以每天添加12000余篇中外论文的速度递增。我们也可以为用户提供个性化、定制化的学者数据。欢迎来电咨询!咨询电话:010-8811{复制后删除}0370

www.globalauthorid.com

TOP

Copyright © 2019-2024 北京同舟云网络信息技术有限公司
京公网安备11010802033243号  京ICP备18003416号-3