Skip to main content
QUICK REVIEW

[Paper Review] DeepDataFlow

Chris Cummins|arXiv (Cornell University)|Jun 1, 2020
Software Engineering ResearchComputer Science21 citations
TL;DR

PROGRAML introduces a graph-based, compiler-agnostic program representation using directed attributed multigraphs to capture control, data, and call dependencies in LLVM and XLA IRs. By applying Message Passing Neural Networks to this structured representation, the method achieves state-of-the-art performance—94.0 F1 score—on core compiler analyses and outperforms prior approaches on heterogeneous device mapping and program classification.

ABSTRACT

This dataset contains 493k LLVM-IRs taken from a wide range of projects and source programming languages, and includes labels for several compiler data analyses. We also include the logs for the machine learning jobs which produced our published experimental results. The uncompressed dataset uses the following layout: <code>labels/</code> Directory containing machine learning features and labels for programs for compiler data flow analyses. <code>labels/&lt;analysis&gt;/&lt;source&gt;.&lt;id&gt;.&lt;lang&gt;.ProgramFeaturesList.pb</code> A ProgramFeaturesList protocol buffer containing a list of features resulting from running a data flow analysis on a program. <code>graphs/</code> Directory containing ProGraML representations of LLVM IRs. <code>graphs/&lt;source&gt;.&lt;id&gt;.&lt;lang&gt;.ProgramGraph.pb</code> A ProgramGraph protocol buffer of an LLVM IR in the ProGraML representation. <code>ll/</code> Directory containing LLVM-IR files. <code>ir/&lt;source&gt;.&lt;id&gt;.&lt;lang&gt;.ll</code> An LLVM IR in text format, as produced by <code>clang -emit-llvm -S</code> or equivalent. <code>test/</code> A directory containing symlinks to graphs in the <code>graphs/</code> directory, indicating which graphs should be used as part of the test set. <code>train/</code> A directory containing symlinks to graphs in the <code>graphs/</code> directory, indicating which graphs should be used as part of the training set. <code>val/</code> A directory containing symlinks to graphs in the <code>graphs/</code> directory, indicating which graphs should be used as part of the validation set. <code>vocab/</code> Directory containing vocabulary files. <code>vocab/&lt;type&gt;.csv</code> A vocabulary file, which lists unique node texts, their frequency in the dataset, and the cumulative proportion of total unique node texts that is covered. For further information please see our ProGraML repository.

Motivation & Objective

  • To address the limitations of sequential and heuristic-based program representations in machine learning for compilers.
  • To close the performance gap between state-of-the-art ML methods and optimal optimization heuristics by improving program representation and model expressiveness.
  • To enable end-to-end, learnable models to perform complex program analyses such as data flow and control flow reasoning.
  • To provide a reusable, general-purpose representation for diverse downstream compiler tasks, including optimization and transpilation.

Proposed method

  • PROGRAML represents programs as directed attributed multigraphs encoding control, data, and call dependencies between instructions.
  • Each node (instruction) is embedded with features including opcode, operand types, ordering, and instruction modifiers.
  • Message Passing Neural Networks (MPNNs) propagate latent representations across the graph, enabling per-instruction and per-variable classification.
  • The model processes the entire program in a single forward pass, capturing long-range dependencies through iterative message passing.
  • The approach is independent of source language and compiler, supporting LLVM and XLA IRs.
  • Training uses real performance data to learn heuristics end-to-end, replacing handcrafted rules with data-driven inference.

Experimental results

Research questions

  • RQ1Can a graph-based program representation capture program semantics more accurately than sequence-based or AST-based methods?
  • RQ2Can MPNNs effectively learn complex compiler analyses such as liveness and dominance from structured program graphs?
  • RQ3How does the expressiveness of PROGRAML compare to prior graph-based or sequential models in standard compiler tasks?
  • RQ4Can the approach generalize across multiple programming languages and compiler IRs?
  • RQ5Does the model achieve state-of-the-art performance on both traditional and high-level compiler tasks?

Key findings

  • PROGRAML achieves a 94.0 F1 score on a benchmark of 250,000 LLVM-IR files across six programming languages, significantly outperforming state-of-the-art methods.
  • The model sets new state-of-the-art performance on heterogeneous device mapping and program classification tasks.
  • The approach improves inference throughput by 76.6× compared to a baseline, despite linear scaling with graph size and message-passing steps.
  • By encoding operand types, ordering, and modifiers, PROGRAML captures semantic distinctions lost in CDFG-based models that only use opcodes.
  • The method successfully learns traditional compiler analyses like dominator trees and data dependencies without explicit supervision.
  • The graph-based representation enables effective modeling of long-range dependencies, overcoming limitations of sequential models and vanishing gradients.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.