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

Safe HaskellNone

LLVM.Analysis.NullPointers

Description

An analysis to identify the NULL state of pointers at each Instruction in a Function. Pointers can either be DefiniteNULL, NotNULL, or Unknown. Only DefiniteNULL and NotNULL are recorded - all other pointers are Unknown.

Synopsis

Documentation

data NullPointersSummary Source

A record of the known NULL and known Not-NULL pointers at each Instruction.

nullPointersAnalysis :: HasCFG cfg => cfg -> NullPointersSummarySource

Determine which pointers are NULL and NotNULL at each Instruction.

nullPointersAt :: NullPointersSummary -> Instruction -> [Value]Source

notNullPointersAt :: NullPointersSummary -> Instruction -> [Value]Source

branchNullInfo :: Failure NullInfoError m => Instruction -> m (BasicBlock, Value, BasicBlock)Source

Given a BranchInst, return:

1) The BasicBlock where a pointer is known to be NULL

2) The value known to be NULL

3) The BasicBlock where the pointer is known to be not NULL

data NullInfoError Source

Constructors

NotABranchInst Instruction 
NotANullTest Instruction