This is the mail archive of the mailing list for the GCC project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [lto]: PATCH: Add output of functions.

Kenneth Zadeck wrote:
This patch is the first cut at writing the gimple function bodies into
the asm file. This is a rewrite of my last patch with all of the dwarf3
removed and many issues addressed. This is now writing to the assembly
file and a lot more of it is table driven, which will also be used on
the reading side.


The interface with CodeSourcery's symbol table code to get references to
the global types and decls is there but is ifdef'ed out with the
preprocessor symbol GIMPLE_SYMBOL_TABLE_WORKS.

Right now the symbol table code has little behind it except calls to abort.

Well, types (are supposed to) work -- so you might as well turn that bit on. :-) And, since CONST_DECLs have no semantics, I don't expect that we'll ever provide an API for writing them out, so you can drop that bit too. I think that it's great that you're trying to make sure you can push lots of input code through your code, but it's going to be a while before we can get all of that working on both sides, so I think you'll need to work with toy programs at first.

One piece of the api that has slipped through the cracks is what am I to
name the sections that the output is in.

I suggest ".lto_$name", where $name is the function's DECL_ASSEMBLER_NAME. We should also select an ELF section type number from the reserved portion of the number space, but that's a detail we can postpone.

If you agree, Sandra and I will wire up enough bits to read a FUNCTION_DECL, call the reader, using the API previously agreed, and generate code within a few days. Theoretically, that should allow us to round-trip small programs.

Mark Mitchell
(650) 331-3385 x713

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]