On Sep 28, 2007, at 2:38 PM, Duncan Sands wrote:
> Hi Chris,
>
>>> Also
>>> 5. Within foo, you need to check that nothing too complicated is
>>> done to P1, for example it isn't stored in a global or passed to
>>> some other function.
>>
>> Actually, worse case, you could just make a trampoline i
Hi Chris,
> > Also
> > 5. Within foo, you need to check that nothing too complicated is
> > done to P1, for example it isn't stored in a global or passed to
> > some other function.
>
> Actually, worse case, you could just make a trampoline in foo.
> However, you're right that this is only wor
>> It is very feasible and would be pretty straight-forward. Consider
>> this code in C:
>>
>> static void foo(funcptr_t P) {
>>P();
>> }
>>
>> void a() {
>>tmp = maketrampoline(somefunc1, somedata);
>>foo(tmp);
>> }
>> void b() {
>>tmp = maketrampoline(somefunc2, somedata);
>>
Hi Chris,
> >>> My hope was that some of these trampoline calls could be eliminated
> >>> using this optimization. But for...
> >>
> >> It would be pretty straight-forward to implement an IPO pass that
> >> turns trampoline pointers into fat pointers in cases like this.
> >
> > that's a very inte
On Sep 17, 2007, at 3:45 AM, Duncan Sands wrote:
>>> My hope was that some of these trampoline calls could be eliminated
>>> using this optimization. But for...
>>
>> It would be pretty straight-forward to implement an IPO pass that
>> turns trampoline pointers into fat pointers in cases like this
Hi Chris,
> > My hope was that some of these trampoline calls could be eliminated
> > using this optimization. But for
> > that to happen, the routines in the container library have to be
> > small enough to be inlined. They are
> > not. In fact they're rather small in terms of lines of cod
On Sep 9, 2007, at 1:46 AM, Duncan Sands wrote:
> Hi Nick,
>
>>> It is easy to construct testcases for which this works, but sadly
>>> I was unable to get
>>> the optimization to occur even once in a trampoline heavy real-
>>> world program without
>>> jacking-up the inlining limit hugely (to
Hi Nick,
> > It is easy to construct testcases for which this works, but sadly I was
> > unable to get
> > the optimization to occur even once in a trampoline heavy real-world
> > program without
> > jacking-up the inlining limit hugely (to 10; 1 wasn't enough).
> > Still, I'm
> > hopi
Duncan Sands wrote:
> It is easy to construct testcases for which this works, but sadly I was
> unable to get
> the optimization to occur even once in a trampoline heavy real-world program
> without
> jacking-up the inlining limit hugely (to 10; 1 wasn't enough).
> Still, I'm
> hoping t
Currently LLVM has two intrinsics for supporting trampolines,
aka pointers to nested functions: init_trampoline and adjust_trampoline.
In essence, init_trampoline fills a block of memory with executable code,
and adjust_trampoline returns a suitable function pointer for calling that
code. These pa
10 matches
Mail list logo