Package org.apache.sysds.hops.ipa

# Class IPAPass

java.lang.Object
org.apache.sysds.hops.ipa.IPAPass

Direct Known Subclasses:
  `IPAPassApplyStaticAndDynamicHopRewrites`, `IPAPassCompressionWorkloadAnalysis`, `IPAPassEliminateDeadCode`, `IPAPassFlagFunctionsRecompileOnce`, `IPAPassFlagLoopsRecompileOnce`, `IPAPassFlagNonDeterminism`, `IPAPassForwardFunctionCalls`, `IPAPassInjectOOCTee`, `IPAPassInlineFunctions`, `IPAPassPropagateReplaceLiterals`, `IPAPassPruneUnreachableHops`, `IPAPassRemoveConstantBinaryOps`, `IPAPassRemoveUnnecessaryCheckpoints`, `IPAPassRemoveUnusedFunctions`, `IPAPassReplaceEvalFunctionCalls`, `IPAPassRewriteFederatedPlan`

public abstract class IPAPass extends Object
Base class for all IPA passes.

## Constructor Summary

Constructors
Constructor
Description
`IPAPass()`

## Method Summary

Modifier and Type
Method
Description
`abstract boolean`
`isApplicable(FunctionCallGraph fgraph)`
Indicates if an IPA pass is applicable for the current configuration such as global flags or the chosen execution mode (e.g., HYBRID).
`abstract boolean`
`rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)`
Rewrites the given program or its functions in place, with access to the read-only function call graph.

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### IPAPass

public IPAPass()

## Method Details

### isApplicable

public abstract boolean isApplicable(FunctionCallGraph fgraph)
Indicates if an IPA pass is applicable for the current configuration such as global flags or the chosen execution mode (e.g., HYBRID).

Parameters:
  `fgraph` - function call graph
Returns:
  true if applicable.

### rewriteProgram

public abstract boolean rewriteProgram(DMLProgram prog, FunctionCallGraph fgraph, FunctionCallSizeInfo fcallSizes)
Rewrites the given program or its functions in place, with access to the read-only function call graph.

Parameters:
  `prog` - dml program
  `fgraph` - function call graph
  `fcallSizes` - function call size infos
Returns:
  true if function call graph should be rebuild