[LLVMdev] is this code really JITed and/or optimized=?koi8-r?Q?=3F=20?=..

Reid Spencer reid at x10sys.com
Sat Aug 14 14:29:10 PDT 2004


ick! Is there a bugzilla on this?

Reid.

On Sat, 2004-08-14 at 13:49, Chris Lattner wrote:

> If you look at the 3 lines above the assert that is failing, you'll see
> this:
> 
>     // FIXME: This code should handle a couple of common cases efficiently, but
>     // it should also implement the general case by code-gening a new anonymous
>     // nullary function to call.
> 
> Basically it's saying that we only support one argument functions that
> take an integer right now.  This is a bug/suboptimality, hence the FIXME.
> 
> There are several different ways to fix the problem, as hinted at by the
> comment.  In the short term, adding something like this:
> 
>   } else if (ArgValues.empty()) {
>     void (*PF)() = (void(*)())getPointerToFunction(F);
>     assert(PF && "Pointer to fn's code was null after getPointerToFunction");
>     PF();
> 
> before the "else" case, should fix the issue for you.  That code is
> basically only smart enough to run 'main', but could be enhanced by
> someone interested in it to handle the general case.
> 
> -Chris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20040814/54fa9ff1/attachment.sig>


More information about the llvm-dev mailing list