# Class: com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher

IR pattern search and replace. 

 Current limitation: matching is limited by basic block boundaries.

## Constructor: EPatternMatcher
- parameter: `pattern`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternCompiler.EPattern`
- parameter: `cfg`, type: `com.pnfsoftware.jeb.core.units.code.asm.cfg.CFG<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement>`
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.IERoutineContext`


## Constructor: EPatternMatcher
- parameter: `pattern`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternCompiler.EPattern`
- parameter: `exp`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`
- parameter: `ctx`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.IERoutineContext`


## Method: getContext
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.IERoutineContext`


## Method: getIRDepthsMap
- return type: `java.util.Map<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric,java.lang.Integer>`


## Method: getInputCfg
- return type: `com.pnfsoftware.jeb.core.units.code.asm.cfg.CFG<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEStatement>`


## Method: getInputExpression
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric`


## Method: getMatchAddress
- parameter: `result`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`
- parameter: `index`, type: `int`
- return type: `long`

Description: 
parameter: result: 
parameter: index: 
return: 

## Method: getPattern
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternCompiler.EPattern`


## Method: isAllowDeepAssociativity
- return type: `boolean`


## Method: replace
- parameter: `r`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`
- parameter: `preferBuiltinReplacer`, type: `boolean`
- return type: `boolean`


## Method: search
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`


## Method: search
- parameter: `lastResult`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`


## Method: searchAndReplace
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`


## Method: searchAndReplace
- parameter: `lastResult`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result`


## Method: searchAndReplaceAll
- return type: `int`

Description: 
return: 

## Method: searchAndReplaceAll
- parameter: `aresult`, type: `com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.compiler.EPatternMatcher.Result[]`
- return type: `int`

Description: 
parameter: aresult: \(optional\) last successful search\-and\-replace
return: 

## Method: setAllowDeepAssociativity
- parameter: `allowDeepAssociativity`, type: `boolean`

Description: Allow to modify inner expression to check alternative associativity. For example, matching `V0 * (#1 + $2)` on `r0 * ((r1 + 4) + r2)` will attempt any associativity, matching on  

```

 V0 = r0
 #1 = 4
 $2 = (r1 + r2)
 
```
  even if \(r1 \+ r2\) * does not* exists in inner expression.
parameter: allowDeepAssociativity: 

## Method: setIRDepthsMap
- parameter: `iRDepthsMap`, type: `java.util.Map<com.pnfsoftware.jeb.core.units.code.asm.decompiler.ir.IEGeneric,java.lang.Integer>`


## Method: toString
- return type: `java.lang.String`


