SCCPSolver ‐ This interface class is a general purpose solver for Sparse Conditional Constant Propagation (SCCP).

Synopsis

Declared in <llvm/Transforms/Utils/SCCPSolver.h>

class SCCPSolver;

Member Functions

Name

Description

SCCPSolver [constructor]

Construct an SCCP solver for the given data layout and TLI callback.

~SCCPSolver [destructor]

Destroy the SCCP solver and its visitor.

addArgumentTrackedFunction

Register F so its arguments are tracked by the solver.

addPredicateInfo

Build PredicateInfo for F and register it with the solver.

addToMustPreserveReturnsInFunctions

Add function to the list of functions whose return cannot be modified.

addTrackedFunction

Register F so calls into and out of it are tracked.

getArgumentTrackedFunctions

Return the set of functions whose arguments are tracked.

getConstant

Helper to return a Constant if LV is either a constant or a constant range with a single element.

getConstantOrNull

Return either a Constant or nullptr for a given Value.

getDataLayout

Return the data layout used by this solver.

getLatticeValueFor

Return the lattice value inferred for non‐struct value V.

getMRVFunctionsTracked

getMRVFunctionsTracked ‐ Get the set of functions which return multiple values tracked by the pass.

getPredicateInfoFor

Return the PredicateInfo associated with I, if any.

getStructLatticeValueFor

Return the lattice values for each element of struct‐typed value V.

getTrackedGlobals

getTrackedGlobals ‐ Get and return the set of inferred initializers for global variables.

getTrackedRetVals

getTrackedRetVals ‐ Get the inferred return value map.

inferArgAttributes

Infer argument attributes from tracked argument lattice values.

inferReturnAttributes

Infer range attributes from tracked return lattice values.

isArgumentTrackedFunction

Returns true if the given function is in the solver's set of argument‐tracked functions.

isBlockExecutable

Return true if BB is currently marked executable.

isEdgeFeasible

Return true if the control‐flow edge from From to To is feasible.

isStructLatticeConstant

Return true if every lattice element of struct return type STy is constant for function F.

markBlockExecutable

Mark BB executable if it was not already considered live.

markFunctionUnreachable

Mark every block in F non‐executable.

markOverdefined

markOverdefined ‐ Mark the specified value overdefined. This works with both scalars and structs.

mustPreserveReturn

Returns true if the return of the given function cannot be modified.

removeLatticeValueFor

Erase the lattice value stored for V.

removeNonFeasibleEdges

Remove CFG edges from BB that the solver proved non‐feasible.

removeSSACopies

Remove PredicateInfo SSA copies from F after solving.

resetLatticeValueFor

Invalidate the Lattice Value of Call and its users after specializing the call. Then recompute it.

resolvedUndefsIn

Resolve undef branch assumptions after solving dataflow for F.

setLatticeValueForSpecializationArguments

Set lattice values for arguments of specialized function F.

simplifyInstsInBlock

Simplify instructions in BB using inferred constants and ranges.

solve

Solve ‐ Solve for constants and executable blocks.

solveWhileResolvedUndefs

Solve and resolve invalidated undefs until a fixed point.

solveWhileResolvedUndefsIn

solveWhileResolvedUndefsIn overloads

trackValueOfArgument

trackValueOfArgument ‐ Mark the specified argument overdefined unless it have range attribute. This works with both scalars and structs.

trackValueOfGlobalVariable

Track loads and stores to GV during interprocedural SCCP.

tryToReplaceWithConstant

Replace uses of V with a constant when the lattice value allows it.

visit

Visit I to update lattice values and executable edges.

visitCall

Visit call I to propagate argument and return lattice values.

Static Member Functions

Name

Description

isConstant

Return true if LV is a constant or a single‐element constant range.

isOverdefined

Return true if LV is overdefined or a multi‐element constant range.

isReplaceableConstant

Return true if LV is a constant that can be unconditionally propagated.

Created with MrDocs