Lines Matching refs:instr

146   InstructForm  *instr;
153 instr = new InstructForm(ident); // Create new instruction form
154 instr->_linenum = linenum();
155 _globalNames.Insert(ident, instr); // Add name to the name table
166 else get_oplist(instr->_parameters, instr->_localNames);
181 if (!strcmp(ident, "predicate")) instr->_predicate = pred_parse();
184 rule = instr->_matrule;
187 rule = match_parse(instr->_localNames);
189 instr->_matrule = rule;
191 if( instr->is_ideal_control() ) {
196 matchrule_clone_and_swap(rule, instr->_ident, match_rules_cnt);
203 rule->_next = match_parse(instr->_localNames);
206 if( instr->is_ideal_control() ) {
211 char* buf = (char*) malloc(strlen(instr->_ident) + 4);
212 sprintf(buf, "%s_%d", instr->_ident, match_rules_cnt++);
215 matchrule_clone_and_swap(rule, instr->_ident, match_rules_cnt);
222 else if (!strcmp(ident, "ins_encode")) ins_encode_parse(*instr);
223 else if (!strcmp(ident, "opcode")) instr->_opcode = opcode_parse(instr);
224 else if (!strcmp(ident, "size")) instr->_size = size_parse(instr);
225 else if (!strcmp(ident, "effect")) effect_parse(instr);
226 else if (!strcmp(ident, "expand")) instr->_exprule = expand_parse(instr);
227 else if (!strcmp(ident, "rewrite")) instr->_rewrule = rewrite_parse();
234 else if (!strcmp(ident, "format")) instr->_format = format_parse();
238 else if (!strcmp(ident, "ins_pipe")) ins_pipe_parse(*instr);
246 temp->_next = instr->_attribs;
247 instr->_attribs = temp;
260 adjust_set_rule(instr);
262 if( instr->expands() ) {
263 if( instr->_ins_pipe )
264 parse_err(WARN, "ins_pipe and expand rule both specified for instruction \"%s\"; ins_pipe will be unused\n", instr->_ident);
266 if( !instr->_ins_pipe )
267 parse_err(WARN, "No ins_pipe specified for instruction \"%s\"\n", instr->_ident);
271 _AD.addForm(instr);
274 rule = instr->_matrule;
279 InstructForm *clone = new InstructForm(ident, instr, rule); // Create new instruction form
309 void ADLParser::adjust_set_rule(InstructForm *instr) {
310 if (instr->_matrule == NULL || instr->_matrule->_rChild == NULL) return;
311 const char *rch = instr->_matrule->_rChild->_opType;
313 if( (! strcmp(instr->_matrule->_opType,"Set")) &&
320 MatchNode *right = instr->_matrule->_rChild;
328 if (instr->_predicate != NULL)
337 if (!lst->search(instr->_matrule->_lChild->_opType)) {
338 const char *cost = instr->cost();
345 lst->insert(instr->_matrule->_lChild->_opType,cost,instr->_ident);
354 if (!lst->search(instr->_matrule->_lChild->_opType)) {
355 const char *cost = instr->cost();
362 lst->insert(instr->_matrule->_lChild->_opType,cost,instr->_ident);
380 // if (!lst->search(instr->_matrule->_lChild->_opType)) {
381 const char *cost = instr->cost();
387 lst->insert(instr->_matrule->_lChild->_opType,cost,instr->_ident);
1271 void ADLParser::ins_pipe_parse(InstructForm &instr) {
1308 _AD._pipeline->_classdict[ident]->is_pipeclass()->_instructs.addName(instr._ident);
1311 instr._ins_pipe = ident;
3164 char* ADLParser::size_parse(InstructForm *instr) {
3199 Opcode * ADLParser::opcode_parse(InstructForm *instr) {
3803 void ADLParser::effect_parse(InstructForm *instr) {
3812 else get_effectlist(instr->_effects, instr->_localNames, instr->_has_call);
3824 ExpandRule* ADLParser::expand_parse(InstructForm *instr) {
3858 ident = get_unique_ident(instr->_localNames,"Operand");
3865 instr->_localNames.Insert(ident, oper);
3904 const Form *form2 = instr->_localNames[ident2];