English version
Accueil     À propos     Téléchargement     Ressources     Contactez-nous    

Ce site est rarement mis à jour. Pour les informations les plus récentes, rendez-vous sur le nouveau site OCaml à l'adresse ocaml.org.

Browse thread
Function Inlining
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: 2005-08-03 (07:16)
From: Ville-Pertti Keinonen <will@e...>
Subject: Re: [Caml-list] Function Inlining
John Carr wrote:

> the assembly code would look like (with tag values omitted for clarity):


That definitely looks good.

> This solves the stack overflow problem.  I'm not convinced that
> the asmcomp phase of the compiler is the right place to do this
> optimization.  Perhaps it should be moved to the intermediate
> phase where the top level module optimization is done now.

One problem with this might be that you don't even have any kind of 
constant folding done at that point (I assume you're referring to the 
transl* phase), so you'd either have to duplicate that functionality or 
limit it to simple constants.