src/Application.php
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
    {
        $this->compilerPasses[] = array($pass, $type);
    }
public function addCompilerPass(CompilerPassInterface $pass, $type = PassConfig::TYPE_BEFORE_OPTIMIZATION)
    {
        $this->compilerPasses[] = array($pass, $type);
    }
Adds a compiler pass.

@param CompilerPassInterface $pass A compiler pass
@param string                $type The type of compiler pass