futhark-0.25.27: An optimising compiler for a functional, array-oriented language.

Safe Haskell | Safe-Inferred
Language | GHC2021

Futhark.Analysis.Interference

Description

Interference analysis for Futhark programs.

Synopsis

- type Graph a = Set (a, a)
- analyseProgGPU :: Prog GPUMem -> Graph VName

# Documentation

type Graph a = Set (a, a) Source #

An interference graph. An element `(x, y)` in the set means that there is an undirected edge between `x` and `y`, and therefore the lifetimes of `x` and `y` overlap and they "interfere" with each other. We assume that pairs are always normalized, such that `x` < `y`, before inserting. This should prevent any duplicates. We also don't allow any pairs where `x == y`.

analyseProgGPU :: Prog GPUMem -> Graph VName Source #