Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:44183 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 1090 invoked from network); 5 Jun 2009 17:04:32 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Jun 2009 17:04:32 -0000 Authentication-Results: pb1.pair.com smtp.mail=paul.biggar@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=paul.biggar@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.92.25 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: paul.biggar@gmail.com X-Host-Fingerprint: 74.125.92.25 qw-out-2122.google.com Received: from [74.125.92.25] ([74.125.92.25:32681] helo=qw-out-2122.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id C4/78-09243-E10592A4 for ; Fri, 05 Jun 2009 13:04:31 -0400 Received: by qw-out-2122.google.com with SMTP id 9so1062341qwb.59 for ; Fri, 05 Jun 2009 10:04:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :from:date:message-id:subject:to:cc:content-type :content-transfer-encoding; bh=PfYFgdb/svC9+WH2hPcKR0I7bCSlTcnPPR8iMH0dk0k=; b=Rxvj1zK9NNUhA6Ijwyq3gDtoVod/4CZa+Qgw4UUuDL4sA2q8+zsO6Xxkzcfq8xLSGh kSZWY3nfYYGtoNPS461LSXuMPjS9SVLZ34RNLe3aZVFbgCRsxITMe1eoRSrI+6GzuNCH HZJcGgAdKp4yj564Or/DEgyAddr1q3uI8X/oY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; b=rzdfxqmbp6pbYl6kgWZBf/14RBCpM5B+ge2pPDA7t8+siSbCElIKEtxM6LZFXGabvI izVPzZaIWNwytabIxHZfWOFvmaHM7QA6bg8rbdDl6tA7D/096FHlxVXcuDOnSD23Sl84 VCl6M4m4j8jMwxBlZBkSbid7e/bmfDnKS/Qy8= MIME-Version: 1.0 Received: by 10.231.35.66 with SMTP id o2mr1033423ibd.42.1244221468167; Fri, 05 Jun 2009 10:04:28 -0700 (PDT) In-Reply-To: References: Date: Fri, 5 Jun 2009 18:04:08 +0100 Message-ID: To: Graham Kelly Cc: PHP Internals , Brian Shire Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Subject: Re: Optimizer discussion From: paul.biggar@gmail.com (Paul Biggar) Hi Graham, On Fri, Jun 5, 2009 at 12:03 PM, Paul Biggar wrote: >> Why not start off with the big stuff, dataflow. I personally believe tha= t working out good data flow for PHP is key to getting good optimizations. = But you are right, its a very tricky thing to do and in some cases impossib= le. Ultimately, I would like to move a lot of the optimizer work more into = this direction and use the data flow to build a basic platform for code ana= lysis on which optimizations can be done. For now though, pecl/optimizer is= "dumb" about data types :-) > > > And now the hard stuff. To avoid me repeating myself, let me just pimp > my Tech Talk. Have a look at > http://www.youtube.com/watch?v=3DkKySEUrP7LA from about the 30:45 mark > until just before the 47:00 mark (slides at > https://www.cs.tcd.ie/~pbiggar/paul_biggar_google_18_mar_2009_notes.pdf). > That highlights most of the problems, and vaguely hints at their > solution. We can go into much greater detail on the solutions after. Based on the fact that you want to do dataflow, I wonder if its a good idea to think about co-opting the phc optimizer to perform analysis on bytecode. To my mind this seems much easier than re-implementing from scratch. As I mentioned before, this incorporates about 2 years of work (much of it research of course, so it might not take as long to replicate). This would mean you could go straight to performing analyses (though there will no doubt be work required on the optimizer itself). Technically speaking, this isn't a big problem. We'd probably need to change the phc MIR to mirror the bytecode (no harm anyway in terms of correctness), and have a bytecode-reader and -writer (though this needn't involve serializing - likely a small interface instead). Politically, I assume it won't be a problem either, since its in PECL. Thoughts? Paul --=20 Paul Biggar paul.biggar@gmail.com