Ejemplo n.º 1
0
  CE_Eliminator(IR* hir) : _cee_count(0), _ifop_count(0), _hir(hir) {
    _has_substitution = false;
    _hir->iterate_preorder(this);
    if (_has_substitution) {
      // substituted some ifops/phis, so resolve the substitution
      SubstitutionResolver sr(_hir);
    }

    CompileLog* log = _hir->compilation()->log();
    if (log != NULL)
      log->set_context("optimize name='cee'");
  }
Ejemplo n.º 2
0
 ~CE_Eliminator() {
   CompileLog* log = _hir->compilation()->log();
   if (log != NULL)
     log->clear_context(); // skip marker if nothing was printed
 }