[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane).
From: |
Rob Landley |
Subject: |
Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane). |
Date: |
Sun, 15 Oct 2006 01:11:58 -0400 |
User-agent: |
KMail/1.9.1 |
On Friday 13 October 2006 12:41 am, Daniel Glöckner wrote:
> On 12 Oct 06 17:11, Rob Landley wrote:
> > and teaching it about dead code elimination are higher priority for me
> > than most other things.
>
> Isn't that easy to do.
> Think about
>
> if(0) {
> ...
> label:
> ...
> }
> ...
> goto label;
>
> You may not discard the contents of the "if" until you are shure that the
> label won't be called.
Or until you're sure it hasn't got any labels in it.
> If C had no "goto" or "switch", setting nocode_wanted would have sufficed.
First approximation is to switch nocode_wanted back on when you hit your first
label. Anything else requires two passes, but there's stuff we're already
doing two passes for anyway (according to the notes, haven't made it that far
in the code yet. Printed out it's 205 pages for tcc.c, I've read maybe 25 of
those so far...)
Rob
--
"Perfection is reached, not when there is no longer anything to add, but
when there is no longer anything to take away." - Antoine de Saint-Exupery
- [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Rob Landley, 2006/10/08
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., veritosproject, 2006/10/09
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Rob Landley, 2006/10/09
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Dave Dodge, 2006/10/11
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Rob Landley, 2006/10/12
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Daniel Glöckner, 2006/10/12
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Rob Landley, 2006/10/12
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Dave Dodge, 2006/10/13
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Daniel Glöckner, 2006/10/13
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane).,
Rob Landley <=
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Dave Dodge, 2006/10/13
- Re: [Tinycc-devel] Compiling qemu-0.8.2 with tcc (yes, I am insane)., Rob Landley, 2006/10/13