Related articles |
---|
how to identify different register class nixxlizzie@yahoo.com (2003-03-09) |
From: | nixxlizzie@yahoo.com (Lizzie Ni) |
Newsgroups: | comp.compilers,comp.cog-eng,comp.dsp |
Date: | 9 Mar 2003 17:26:27 -0500 |
Organization: | http://groups.google.com/ |
Keywords: | DSP, code |
Posted-Date: | 09 Mar 2003 17:26:27 EST |
Hi
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
register.
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.
memreg:STORE(con)
or
accu:STORE(con)
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
thanks.
Return to the
comp.compilers page.
Search the
comp.compilers archives again.