Re: Writing compilers, and example.c vs compile-i386.c

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Tue, Jun 17, 2008 at 4:35 PM, David Given <dg@xxxxxxxxxxx> wrote:

> Christopher Li wrote:
> However: I notice that the code seems to make use of OP_DEATHNOTE
> instructions to mark hardregs as being dead. However, these are only
> generated if track_pseudo_death(ep) is called --- and example.c never
> calls this. It *is*, however, called if -vdead is specified on the
> command line. Is this a bug in example.c or am I just misunderstanding
> things?

You understands it correctly. The example.c should call track_pseudo_death(ep).
It is a bug that I disable the dead node by default and forget to enable it for
example.c. For normal checking, death node is not needed, and if it is needed,
you can always generates it.

We should add the death node back for example.c. Patches are welcome
as well.

BTW, you shouldn't take example.c too seriously per Linus' suggestion.

> (Also, the OP_DEATHNOTE instructions appear to occur *before* the
> instruction that uses them last --- is this so that the instruction can
> reuse the register is the code generator sees fit to do so?)

I think so, it just let the code generator know that they don't need to preserve
that register any more for the next instruction they emit. It is a very naive
register allocations any way. Feel free to roll your own if you see fits.

> (In addition, I notice that once liveness tracking has been done phisrc
> nodes get annotated with the desired shared register that the phi should
> occupy; suddenly, the phi stuff all makes sense.)

Glad to hear that.


> (PS. Please don't cc me if you're also mailing the list --- I only need
> one copy!)

You mean your email client is not smart enough to realize that is the
same email :-)  I prefer to get CC directly to get a sense of being part of
the discussion. My email will filter differently if I am directly addressed.

Chris
--
To unsubscribe from this list: send the line "unsubscribe linux-sparse" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Newbies FAQ]     [LKML]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Trinity Fuzzer Tool]

  Powered by Linux