From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id BE6AFBC57 for ; Fri, 3 Dec 2010 15:07:27 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap8AAMuI+EzRVaE0kGdsb2JhbACjLQgWAQIJCQwHEQQeqFyJaIIYhQkuiFYBAQMFgg+DNASOZYIK X-IronPort-AV: E=Sophos;i="4.59,293,1288566000"; d="scan'208";a="81239968" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail4-smtp-sop.national.inria.fr with ESMTP; 03 Dec 2010 15:07:02 +0100 Received: by fxm5 with SMTP id 5so7653604fxm.39 for ; Fri, 03 Dec 2010 06:07:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type:content-transfer-encoding; bh=K6CCP5SOmTonYi32mE+eF/lAdY/nQ9gC5059y0o8xPE=; b=YRHVioK3P6RFlPcCVwmaD05Evg/DV3wrE01JioGBK02DSTEycJgVXxFdDA0j9PaPC3 +daW7P6pbHab0L1Ij9e+aTRCor3dZZK8Kc+FzoBEwbKUL4i+X7XlaxMyS3p7OUYsS/Sx 7djvC1yJxPUmMCPMhI1/VbwN+QmdSbX8tAEzg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type:content-transfer-encoding; b=LjphJAUfjq7L1YslJQAxKk+adLtlvWf9i7u+rF9x8kF1++LO3DUUfPdJzeRTTJ1xcc 0sf/ebdwZf4UTVhnbuNaA+1O+yr7Bkl9KvGCnTmYB3YXfMhBkQjUutLyTLlkgpylqZ+Q RsE31s77Oo/Lb4W9GyJ7pt/byiaMidw4m3CWc= Received: by 10.223.86.16 with SMTP id q16mr2149651fal.58.1291385221802; Fri, 03 Dec 2010 06:07:01 -0800 (PST) Received: from deb0 ([79.114.37.253]) by mx.google.com with ESMTPS id f24sm621736fak.24.2010.12.03.06.07.00 (version=SSLv3 cipher=RC4-MD5); Fri, 03 Dec 2010 06:07:01 -0800 (PST) Date: Fri, 3 Dec 2010 16:06:56 +0200 From: =?UTF-8?B?VMO2csO2aw==?= Edwin To: Eray Ozkural Cc: Till Varoquaux , caml-list@yquem.inria.fr Subject: Re: ocamlopt LLVM support (Was: [Caml-list] OCamlJIT2 vs. OCamlJIT) Message-ID: <20101203160656.4d48ce68@deb0> In-Reply-To: References: <3DCEA910-1382-47E5-876B-059178F8F82E@googlemail.com> <20101130124803.7952fca1@deb0> <0a8b01cb90da$da5e6240$8f1b26c0$@com> <5E2DA3F1-7998-4F62-B617-7B6451D1001D@googlemail.com> <0b3b01cb9161$a81c8e10$f855aa30$@com> <0b9301cb91a3$8f42fd60$adc8f820$@com> X-Mailer: Claws Mail 3.7.6 (GTK+ 2.20.1; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; ocamlopt:01 eray:01 ozkural:01 ipa:01 lib:01 ipa:01 high-level:01 ocaml's:01 edwin:98 ipo:98 wrote:01 caml-list:01 immutable:01 data:02 structures:02 On Fri, 3 Dec 2010 15:41:41 +0200 Eray Ozkural wrote: > Is there IPA in LLVM? I didn't know that. > See createStandardLTOPasses and the UnitAtATime part of createStandardModulePasses: http://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/Support/StandardPasses.h Also http://llvm.org/svn/llvm-project/llvm/trunk/include/llvm/Transforms/IPO.h http://llvm.org/svn/llvm-project/llvm/trunk/lib/Analysis/IPA I doubt they'll be able to figure out everything on their own though, the frontend should probably add some extra info. For example by adding some function attributes, or some metadata about the high-level types. I see that LLVM has a metadata based TBAA, but right now it is for C/C++, so I'm not sure it could take advantage of all the properties of a functional language. It'd probably be better if an OCamlAA was written (perhaps building on the already existing TBAA, or improving that) that takes advantage of immutable data structures and OCaml's type system. Best regards, --Edwin