Date: Fri, 1 Jul 2011 09:37:41 -0700 From: Marcel Moolenaar <marcel@xcllnt.net> To: Roman Divacky <rdivacky@freebsd.org> Cc: svn-src-projects@freebsd.org, Marcel Moolenaar <marcel@freebsd.org>, src-committers@freebsd.org Subject: Re: svn commit: r223705 - projects/llvm-ia64/lib/clang/libllvmjit Message-ID: <00211D6B-F882-43C1-9D93-5ED2D72C5132@xcllnt.net> In-Reply-To: <20110701084224.GA43291@freebsd.org> References: <201107010329.p613Tn8s071270@svn.freebsd.org> <20110701084224.GA43291@freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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@xcllnt.net
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?00211D6B-F882-43C1-9D93-5ED2D72C5132>