From dev-return-35060-apmail-harmony-dev-archive=harmony.apache.org@harmony.apache.org Sat Sep 20 02:43:00 2008 Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 29892 invoked from network); 20 Sep 2008 02:43:00 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 20 Sep 2008 02:43:00 -0000 Received: (qmail 13482 invoked by uid 500); 20 Sep 2008 02:42:55 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 13451 invoked by uid 500); 20 Sep 2008 02:42:55 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 13440 invoked by uid 99); 20 Sep 2008 02:42:55 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Sep 2008 19:42:55 -0700 X-ASF-Spam-Status: No, hits=2.0 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of xiaoming.gu@gmail.com designates 64.233.182.191 as permitted sender) Received: from [64.233.182.191] (HELO nf-out-0910.google.com) (64.233.182.191) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 Sep 2008 02:41:56 +0000 Received: by nf-out-0910.google.com with SMTP id c7so365779nfi.40 for ; Fri, 19 Sep 2008 19:42:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:mime-version:content-type; bh=NnO74mAWiIUsBaaTs56gbj2fLoa7xFHso5iVo6Au4XM=; b=OsSOujqwPDnbsdx1Voo+kyiN4nqoEMT8UvQIcD/tFW+OpO8r3yFQZd0ElIb517wrT1 InYrVW4P6p92/lw+T+r7Xg2Tkrk2aE37tXeoFRGETGFGkWF+kIqniVMZ+i1RTP2ABz8f e/e2Eo8/RGFQp6Mp7lgF30hR9OBa7NEVO2b+4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:mime-version:content-type; b=OEXL7kgvDKobr1MbCpXotmsbRYsEVdnV+bJDFekDLhmrgFlokl3CS61XQJtrjs2I7s uVz4tqR2x+knBU2qI6QvQ+dmu8OCg1OgQ7uECGBVIfeBH1yClOXnQXR238O0YbVb/h8j SrCthU2BoxmjrkGsbE0twcRJFyXkC1DD34E5k= Received: by 10.210.52.9 with SMTP id z9mr1032533ebz.189.1221878530963; Fri, 19 Sep 2008 19:42:10 -0700 (PDT) Received: by 10.210.29.14 with HTTP; Fri, 19 Sep 2008 19:42:10 -0700 (PDT) Message-ID: <255079590809191942n2ad3a29dgcfd43b7fc3430aae@mail.gmail.com> Date: Sat, 20 Sep 2008 10:42:10 +0800 From: "xiaoming gu" To: dev@harmony.apache.org Subject: a better selection heuristic for register allocation? MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="----=_Part_54976_11170692.1221878530954" X-Virus-Checked: Checked by ClamAV on apache.org ------=_Part_54976_11170692.1221878530954 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline Hi, all. I did some study of register allocation these days. In current version, there are two kinds of register allocation - bin-packing (BP) and coloring-graph (CG). In client modes (client and opt), only BP is used. In server modes (server, server_aggressive and server_static), BP and CG are two choices for the being compiled function. If the number of operands in the function is less than a threshold, CG is selected. Otherwise, BP is selected. The default value for this threshold is 2000 and in server_aggressive it's set to 10000. My question is that is it better to make the selection heuristic for BP/CG more meaningful? An intuitive is to use CG for hot functions. What's your opinions? Thanks. Xiaoming ------=_Part_54976_11170692.1221878530954--