Lines Matching defs:rule

41 static const char *knownInvalid = "knownInvalid";    // The result does NOT have a rule defined
42 static const char *knownValid = "knownValid"; // The result must be produced by a rule
74 // Track the status of all production rule results
118 const char *arrayIdx, const Expr *cost, const char *rule, ProductionState &status) {
129 if( debug_output ) { fprintf(fp, "// Previous rule with lower cost than: %s === %s_rule costs %s\n", arrayIdx, rule, cost->as_string()); }
137 if( debug_output ) { fprintf(fp, "// Previous rule with higher cost\n"); }
167 fprintf(fp, "%s %s(%s, %s_rule, %s)", spaces, production, arrayIdx, rule, cost->as_string() );
169 if( cost_is_below_lower_bound ) { fprintf(fp, "\t // overwrites higher cost rule"); }
228 // Add in cost of this rule
271 // Check against other match costs, and update cost & rule vectors
274 // If this is a member of an operand class, update the class cost & rule
277 // Check if this rule should be used to generate the chains as well.
278 const char *rule = /* set rule to "Invalid" for internal operands */
281 // If this rule produces an operand which has associated chain rules,
282 // update the operands with the chain rule + this rule cost & this rule.
283 chain_rule(fp, spaces6, mList._resultStr, cost, rule, operands_chained_from, status);
304 // Check against other match costs, and update cost & rule vectors
325 const char *result, *cost, *rule;
326 for(lst->reset(); (lst->iter(result,cost,rule)) == true; ) {
337 Form *form = (Form *)_globalNames[rule];
339 // printf(" result=%s cost=%s rule=%s\n", result, total_cost, rule);
340 // Check against other match costs, and update cost & rule vectors
341 const char *reduce_rule = strcmp(irule,"Invalid") ? irule : rule;
345 // printf(" result=%s cost=%s rule=%s\n", result, total_cost, rule);
346 // Check against other match costs, and update cost & rule vectors
347 cost_check(fp, indent, ArchDesc::getMachOperEnum(result), total_cost, rule, status);
348 chain_rule(fp, indent, result, total_cost, rule, operands_chained_from, status);
351 // If this is a member of an operand class, update class cost & rule
367 // in any match rule in the ad file. Each case has a series of if's to handle
369 // rule, and prune any cases which are higher cost for the same reduction.
399 // #define DFA_PRODUCTION(result, rule, cost)\
400 // _cost[ (result) ] = cost; _rule[ (result) ] = rule;
401 fprintf(fp, "#define %s(result, rule, cost)\\\n", dfa_production);
402 fprintf(fp, " _cost[ (result) ] = cost; _rule[ (result) ] = rule;\n");
405 // #define DFA_PRODUCTION__SET_VALID(result, rule, cost)\
406 // DFA_PRODUCTION( (result), (rule), (cost) ); STATE__SET_VALID( (result) );
407 fprintf(fp, "#define %s(result, rule, cost)\\\n", dfa_production_set_valid);
408 fprintf(fp, " %s( (result), (rule), (cost) ); STATE__SET_VALID( (result) );\n", dfa_production);
415 "// in any match rule in the ad file. Each case has a series of if's to handle\n"
417 "// rule, and prune any cases which are higher cost for the same reduction.\n"