llvm-analysis-0.3.0: A Haskell library for analyzing LLVM bitcode

Safe HaskellNone

LLVM.Analysis.ScalarEffects

Description

This analysis identifies the (memory) effects that functions have on the scalar components of their arguments.

Only pointer parameters are interesting because only their effects can escape the callee. Effects are currently restricted to increments and decrements of integral types. The affected memory can be a struct member; the effects are described in terms of abstract AccessPaths.

This is a must analysis. Effects are only reported if they *MUST* occur (modulo non-termination style effects like calls to exit or infinite loops).

Currently, sequential effects are not composed and nothing useful will be reported.

Synopsis

Documentation

data ScalarEffect Source

The types of effects tracked by this analysis. This can be expanded as the analysis becomes more sophisticated (it could include general affine relations or even relate arguments to each other).

scalarEffectAnalysis :: (Monad m, HasCFG funcLike, HasFunction funcLike) => funcLike -> ScalarEffectResult -> m ScalarEffectResultSource