svn commit: r223705 - projects/llvm-ia64/lib/clang/libllvmjit
Marcel Moolenaar
marcel at xcllnt.net
Fri Jul 1 16:37:39 UTC 2011
On Jul 1, 2011, at 1:42 AM, Roman Divacky wrote:
> I think you can completely leave out JIT for now :)
Yeah. I was just fixing the native ia64 build. I don't
care about JIT right now, but I do care about native
builds.
> Anyway, great to see some progress! What is the status now?
> Where are you blocked?
The good thing is that I'm not blocked. I have the obviously
important lowering methods stubbed (LowerFormalArguments, LowerCall
and LowerReturn), which means that I can now compile functions and
have clang complete normally. With the stubs, there's no code
generation of course, but it means that I'm all set to start with
the actual implementations and add instructions and formats to the
.TD file.
In other words: the real work can start and I plan to work on
LowerReturn first while I work out the tblgen stuff.
The following open items are on my mind:
1. On ia64, function prologues allocate a register frame that has
enough (stacked) registers for local scratch registers and
outgoing function arguments. This means that I need to know
(after register allocation) how many (unique) scratch registers
are in use and what the largest number of arguments that need
to be passed in registers to children (the max being 8). Without
this information the compiler is forced to allocate the maximum
size (which is 96 stacked registers, of which 8 are outgoing).
This obviously eats into the register stack and probably causes
runtime failures on deep call chains.
2. [C++] vtable entries are not function pointers like on other
architectures. They are function descriptors. I think Nathan
said that PowerPC64 also have function descriptors. Anyway,
Duraid Madina (the author of the original ia64 backend) said
that support for this was missing from LLVM. I don't know if
this has changed in the mean time or whether I need to go
down into the bowels of LLVM and add support for this.
--
Marcel Moolenaar
marcel at xcllnt.net
More information about the svn-src-projects
mailing list