Re: Help with Live Range Analysis?



John Carney <j.carney@xxxxxxxxx> wrote:
Compiler Gurus,

I am working on a microcode project where register allocation is done
by the programmer. There is nothing which prevents the programmer from
allocating two or more variables to the same register and then
inadvertently writing code with overlapping live ranges for those
variables. The microcode assembler trusts the register allocation and
this results in (numerous) bugs which are difficult to find. ...

Sample representation for analysis tool:

label_1:
write a;
write b;

label_2:
read a;
write c;

nway_branch label_3 label_5 label_8;

label_3:

You can write a sourcecode interpreter that "runs" the sourcecode
through a target processor simulator which runs every possible branch
combination while checking a database of register<->variable records
for register conflicts. Compiler optimizers do this.

One advantage of strictly structured languages is that it's easier to
check for alias conflicts at the sourcecode level, so another solution
is to create a simple macro language for programing the target
processor that by it's strict design will prevent register conflicts.


Steve www.ml1compiler.org (macro processor)

.



Relevant Pages

  • Help with Live Range Analysis?
    ... I am working on a microcode project where register allocation is done ... There is nothing which prevents the programmer from ... Sample representation for analysis tool: ...
    (comp.compilers)
  • Re: Register keyword and "as if" rule...
    ... Register allocation is provably NP-hard, and is solved by very compute ... out-think the compiler when it comes to register allocation. ... It may be better for that application to allocate 50% of the registers to optimizing 10 lines of code in the critical path. ...
    (comp.lang.c)
  • Re: instruction rescheduler?
    ... assembly language have never written code in another assembler. ... > -- register allocation and keeping track of which register is what, ... Register allocation, globally, is one of those things a machine usually ... Assembly programmers don't want to believe that a machine could ...
    (comp.lang.asm.x86)
  • Re: How does this make you feel?
    ... If it is possible to offload work from the programmer in such a common case, ... the end user doesn't care in the least about computer architecture aesthetics. ... behaviour of a conventionally conceieved register. ... advocating a change in the way registers are conceived from a CPU ...
    (comp.arch)
  • Re: Help to copy PAL16 / GAL16 / GAL20 ICs
    ... > these chips and fear I may run in to this issue. ... > fear it may be more programmer then I might need. ... > what options do I have to try and reverse engineer these chips? ... the internal gate and register mapping, ...
    (sci.electronics.basics)