bool share_dsp (Instruction *I, Allocation *alloc) {
    return (
        isMul(I) &&
        alloc->useExplicitDSP(I) && (
            LEGUP_CONFIG->getParameterInt("SHARE_MUL") ||
            LEGUP_CONFIG->getParameterInt("RESTRICT_TO_MAXDSP") ||
            LEGUP_CONFIG->getParameterInt("MULTIPUMPING")
        )
    );
}
Exemple #2
0
/* <e1> [ * <e2> ] */
static Expression *e2(void) {
  Expression *left = e1();
  enum EKind kind;

  if (isMul()) {
    kind = eMUL;
  } else {
    return left;
  }

  consume();

  Expression *e = NEW(Expression);

  e->kind = kind;
  e->left = left;
  e->right = e2();

  return e;
}