Re: [PATCH v2] sparse: add LLVM code generation backend

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

 



Christopher Li wrote:
On Mon, Apr 27, 2009 at 3:39 PM, Jeff Garzik <jeff@xxxxxxxxxx> wrote:
You can see the above code was taken verbatim from show-parse.c, and is
probably nothing more than a check the original author (Linus?) felt
appropriate at the time, for show-parse.c.  I wouldn't read too much into
its presence in s2l-gen.c -- maybe those checks can simply be deleted.

I did not explain it clear it enough. It is not about the code is not
used. My point is:

1) linearize instruction does not lose the information you care about
   generating better LLVM code. The evaluation does.

2) By writing your own AST recursive code, it does not gain more
   information than what you can already do with current linearize
   instruction. The EXPR_DEREF is processed in evaluation stage.
   The structure laid you care about is already gone by the time your
   s2l-gen about to emit LLVM byte codes. You did not generate any
   GET_ELEMENT_PTR in your LLVM byte code, right?

Not true -- I can walk SYM_STRUCT of the function arguments' base_type passed to a SYM_FN. Similarly so for struct-based variable declarations.

With that information, you can easily back-reference lvalue uses to the original struct.

	Jeff



--
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