how to identify different register class (Lizzie Ni)
9 Mar 2003 17:26:27 -0500

          From comp.compilers

Related articles
how to identify different register class (2003-03-09)
| List of all articles for this month |

From: (Lizzie Ni)
Newsgroups: comp.compilers,comp.cog-eng,comp.dsp
Date: 9 Mar 2003 17:26:27 -0500
Keywords: DSP, code
Posted-Date: 09 Mar 2003 17:26:27 EST


I am using a code generator generator (olive) to do instruction
selection & register allocation of the code generation for a DSP. The
DSP has several register classes which has different specific
function. I am confused about how to select the variables in the
machine independent Intermediate Representation(IR)code that contains
NO information about the target with the correct class of the

For example,
t1=0 ----IR code,
This could be an assignment to a register in the accumulator register
class ('accu' nonterminal)or memory register class ('memreg'
nonterminal). Their rules are written below.

Suppose the above two rules have the same cost and the IR code (t1=0)
should be matched by 'accu' rule. However the code selector always use
one rule to match the assignment rather than pick up the correct match
according to different situation. In this case, how could I guide the
code selector to pick up the 'accu' rule this time and maybe select
'memreg' rule in other cases? I am totally puzzled about this.

I am really appreciate any suggestions that you could give. Many many

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.