Re: Help with Live Range Analysis?

Steven Nichols <sdn@svpal.org>
Sun, 13 Jan 2008 11:20:48 +0000 (UTC)

          From comp.compilers

Related articles
Help with Live Range Analysis? j.carney@yahoo.com (John Carney) (2008-01-12)
Re: Help with Live Range Analysis? sdn@svpal.org (Steven Nichols) (2008-01-13)
Re: Help with Live Range Analysis? rayiner@gmail.com (Rayiner Hashem) (2008-01-13)
Re: Help with Live Range Analysis? rayiner@gmail.com (Rayiner Hashem) (2008-01-13)
Re: Help with Live Range Analysis? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2008-01-14)
Re: Help with Live Range Analysis? j.carney@yahoo.com (John Carney) (2008-01-17)
| List of all articles for this month |

From: Steven Nichols <sdn@svpal.org>
Newsgroups: comp.compilers
Date: Sun, 13 Jan 2008 11:20:48 +0000 (UTC)
Organization: Silicon Valley Public Access Link
References: 08-01-034
Keywords: analysis, registers
Posted-Date: 13 Jan 2008 22:43:17 EST

John Carney <j.carney@yahoo.com> 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)



Post a followup to this message

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