[LLVMdev] is this code really JITed and/or optimized=?koi8-r?Q?=3F=20?=..
Chris Lattner
sabre at nondot.org
Sat Aug 14 14:45:37 PDT 2004
On Sat, 14 Aug 2004, Reid Spencer wrote:
> ick! Is there a bugzilla on this?
Nope, feel free.
-Chris
> 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
>
-Chris
--
http://llvm.org/
http://nondot.org/sabre/
More information about the llvm-dev
mailing list