Lib/Target/instr/Instr.cpp
/**
 * Initialize the fields per selected instruction tag.
 *
 * Done like this, because union members can't have non-trivial constructors.
 */
Initialize the fields per selected instruction tag.
Done like this, because union members can't have non-trivial constructors.
Initialize the fields per selected instruction tag . Done like this because union members can ' t have non - trivial constructors .
Instr::Instr(InstrTag in_tag) {
  switch (in_tag) {
  case InstrTag::ALU:
    tag          = in_tag;
    m_assign_cond = always;
    m_set_cond.clear();
    break;
  case InstrTag::LI:
    tag           = in_tag;
    m_assign_cond = always;
    m_set_cond.clear();
    break;
  case InstrTag::BRL:
    tag               = in_tag;
    m_branch_cond.tag = BranchCond::COND_ALWAYS;
    break;
  case InstrTag::INIT_BEGIN:
  case InstrTag::INIT_END:
  case InstrTag::RECV:
  case InstrTag::END:
  case InstrTag::VPM_STALL:
    tag = in_tag;
    break;
  default:
    assert(false);
    break;
  }
}
Instr :: Instr ( InstrTag in_tag ) { switch ( in_tag ) { case InstrTag :: ALU : tag = in_tag ; m_assign_cond = always ; m_set_cond . clear ( ) ; break ; case InstrTag :: LI : tag = in_tag ; m_assign_cond = always ; m_set_cond . clear ( ) ; break ; case InstrTag :: BRL : tag = in_tag ; m_branch_cond . tag = BranchCond :: COND_ALWAYS ; break ; case InstrTag :: INIT_BEGIN : case InstrTag :: INIT_END : case InstrTag :: RECV : case InstrTag :: END : case InstrTag :: VPM_STALL : tag = in_tag ; break ; default : assert ( false ) ; break ; } }
Initialize the fields per selected instruction tag.
Initialize the fields per selected instruction tag .