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

Safe HaskellNone

LLVM.Analysis.NoReturn

Description

An analysis to identify functions that never return to their caller. This only counts calls to exit, abort, or similar. Notably, exceptions are not considered since the caller can catch those.

The dataflow fact is Function does not return. It starts at False (top) and calls to termination functions (or the unreachable instruction) move it to True.

Meet is &&. Functions are able to return as long as at least one path can return.

Synopsis

Documentation

noReturnAnalysis :: (Monad m, HasCFG cfg) => (ExternalFunction -> m Bool) -> cfg -> HashSet Function -> m (HashSet Function)Source

The functions in the returned set are those that do not return.

Warning, this return type may become abstract at some point.