[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Question of JITC
From: |
Max Brister |
Subject: |
Re: Question of JITC |
Date: |
Wed, 28 Aug 2013 23:52:52 -0700 |
On Tue, Aug 20, 2013 at 1:05 AM, lyh.kernel <address@hidden> wrote:
> Hello Max,
>
> I am wondering whether the type inference you implemented is incremental or
> not. Incremental means for a user defined function, we may do type inference
> on it without considering argument type, storing the inference result. When
> the function is called, we could get data type of parameters and do further
> inference based on previous semi-finished result.
>
> Thanks a lot
Hi Lyh,
That is a good question. Calling user functions from JIT is not
supported yet (as opposed to builtin functions, like sin, where a few
are supported). We do support compilation of anonymous functions, but
we can't call them from JIT.
An implementation would probably be incremental. The idea is to extend
jit_instruction to support calls to user defined functions. The
important method to override is the infer method, which does type
inference based on the current guess of the argument types[1].
[1]
http://hg.savannah.gnu.org/hgweb/octave/file/91691d74845d/libinterp/corefcn/jit-ir.cc#l724
--
Max Brister