Re: [PATCH 03/15] Add type information to struct instruction.

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

 



On Mon, Dec 22, 2008 at 8:46 PM, Alexey Zaytsev
<alexey.zaytsev@xxxxxxxxx> wrote:
> Are you sre this is worth the effort (and code complication)? Struct
> instruction is not exactly a tiny one, and a pointer would bloat it
> by about 10%. On the other hand, I don't really unerstand why

That complexity is needed for the back end to generated C
code any way. Currently, if you save the full C type into instruction.
The back end needs to look into the C type and determinate which
native machine type it should use.

While if you do that up front, the back end side will have a simple
1 to 1 mapping. It will make David's back end code simpler.

On my machine(64 bit). It jump from 56 to 64.  That is 14%.

> the type information is associated with the instructions, and not
> with the pseudos. Am I missing something?

If you have it in the pseudos, the instruction size will depend on
the type of the instruction. There is no universal pseudo member
can be access for all the instruction types. One instruction
can have more than one pseudo, so you are likely to increase the
over all size.

>> That have the extra benefit of, different architecture can share
>> the same byte code.
> Didn't understand this comment.

I am thinking that, if you dump the byte code into file. Then
different back end will need to have different byte code binary,
because difference in the basic type size.

I just realized that because we store the sizeof operation into
binary values, so they are going to have different binary any way.
So this does not matter.

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