DFA-Net: A Compiler-Specific Neural Architecture for Robust Generalization in Data Flow Analyses

Research output: Contribution to book/Conference proceedings/Anthology/ReportConference contributionContributedpeer-review

Contributors

Abstract

Data flow analysis is fundamental to modern program optimization and verification, serving as a critical foundation for compiler transformations. As machine learning increasingly drives compiler tasks, the need for models that can implicitly understand and correctly reason about data flow properties becomes crucial for maintaining soundness. State-of-the-art machine learning methods, especially graph neural networks (GNNs), face challenges in generalizing beyond training scenarios due to their limited ability to perform large propagations. We present DFA-Net, a neural network architecture tailored for compilers that systematically generalizes. It emulates the reasoning process of compilers, facilitating the generalization of data flow analyses from simple to complex programs. The architecture decomposes data flow analyses into specialized neural networks for initialization, transfer, and meet operations, explicitly incorporating compiler-specific knowledge into the model design. We evaluate DFA-Net on a data flow analysis benchmark from related work and demonstrate that our compiler-specific neural architecture can learn and systematically generalize on this task. DFA-Net demonstrates superior performance over traditional GNNs in data flow analysis, achieving F1 scores of 0.761 versus 0.009 for data dependencies and 0.989 versus 0.196 for dominators at high complexity levels, while maintaining perfect scores for liveness and reachability analyses where GNNs struggle significantly.

Details

Original languageEnglish
Title of host publicationCC 2025 - Proceedings of the 34th ACM SIGPLAN International Conference on Compiler Construction
EditorsDaniel Kluss, Sara Achour, Jens Palsberg
PublisherAssociation for Computing Machinery, Inc
Pages92-103
Number of pages12
ISBN (electronic)9798400714078
Publication statusPublished - 25 Feb 2025
Peer-reviewedYes

Publication series

SeriesCC: Compiler Construction

Conference

Title34th ACM SIGPLAN International Conference on Compiler Construction
Abbreviated titleCC 2025
Conference number34
Descriptionco-located with CGO, PPoPP and HPCA
Duration1 - 2 March 2025
LocationWestin Las Vegas
CityLas Vegas
CountryUnited States of America

External IDs

ORCID /0000-0002-5007-445X/work/190572580

Keywords

Keywords

  • Data Flow Analysis, Machine Learning, Neural Network Architecture