Return-Path: X-Original-To: apmail-impala-dev-archive@minotaur.apache.org Delivered-To: apmail-impala-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 1F177187F0 for ; Wed, 24 Feb 2016 00:05:27 +0000 (UTC) Received: (qmail 7115 invoked by uid 500); 24 Feb 2016 00:05:27 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 7073 invoked by uid 500); 24 Feb 2016 00:05:27 -0000 Mailing-List: contact dev-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@impala.incubator.apache.org Delivered-To: mailing list dev@impala.incubator.apache.org Received: (qmail 7060 invoked by uid 99); 24 Feb 2016 00:05:26 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 24 Feb 2016 00:05:26 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id 56333C06D1 for ; Wed, 24 Feb 2016 00:05:26 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.279 X-Spam-Level: * X-Spam-Status: No, score=1.279 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=cloudera-com.20150623.gappssmtp.com Received: from mx2-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id skA72cFBp22Z for ; Wed, 24 Feb 2016 00:05:23 +0000 (UTC) Received: from mail-lf0-f50.google.com (mail-lf0-f50.google.com [209.85.215.50]) by mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id 528F65F5CC for ; Wed, 24 Feb 2016 00:05:22 +0000 (UTC) Received: by mail-lf0-f50.google.com with SMTP id l143so1346640lfe.2 for ; Tue, 23 Feb 2016 16:05:22 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cloudera-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=Qc1ia1Ep2Xfcr6QVygHWBa7iU/rY6h9sKEiNxvPQiWo=; b=nedIp1VVdS9IKIcXp1tGH/WrYqI/HTsu8OMVTigUieWzEq44fTgfE0QUqgBTcu600P slCaMXGvg26L7btN1qKdUNRF8Lp01GRasWpsWYlz7dzNzU9HIFcPa6LNdMxa+b/eXvm5 oTEXWgAp4NjCyo03MkU5x8HdVNSznOvpIYsr5HVxNNBcNI6R3UAIPtZIYp5IBua8H3q1 tHZ1PJGmBJegB/XcQYcZQ9/aR/JKb0I0rq+AGP1xhU8NaPqG0SdxiYv3R8r2g8mScLN1 5huCakHN3pWd5tzZa05Du2dozWo8ZO+Z27vbq+ICTBBlTB4dYhYtHpA6przwjLqDSVvE DLrA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc:content-type; bh=Qc1ia1Ep2Xfcr6QVygHWBa7iU/rY6h9sKEiNxvPQiWo=; b=HrVLqWEJlrhZV1FNETKG5orzb9FXQ0o+yTg8psE2laRtVeaJl5q+tWB6iCpPVnu4qM zYQCMeuMiqEYECG+8m3Fphn7Jy8N/aVJTpDHZYG106hegbA2iQtFCKl+n0OpT7EUnxV/ IRY95Ez3zhL+8lOZoJ3Si90xQIwm+0TeeaCFWfCQXTvT5cGgAPcsp6g2AWpzjGUXEK/m QKVCRZrCeooUpz8RVKjvhTsZ/jGvMG1PI1HCAa6LGPIEC3Z67HY4I1s16+bjIHA4btfc hzl9V4AMfBWGqaVdgteKdQZsc0P+Qidv+ay/Tosu6Uok+9zrsfxDEFRN3qLmjQc/O+QO ATiQ== X-Gm-Message-State: AG10YOTLZVF8yT8l0odlT57HLduJb8n+SS1lN24xpGZzr1gOgORkVTo7gKOGHdQo+9f4+WOr0cd4W9bCwdNsSTin X-Received: by 10.25.161.131 with SMTP id k125mr10027629lfe.83.1456272316351; Tue, 23 Feb 2016 16:05:16 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.184.195 with HTTP; Tue, 23 Feb 2016 16:04:56 -0800 (PST) In-Reply-To: References: <22f40c9f-d578-4b81-9f87-683857166805@cloudera.org> <04556600-a84b-43fc-b566-3756616b7eb7@cloudera.org> <201602181316.u1IDGZmR015375@d03av01.boulder.ibm.com> <201602191036.u1JAaqln029510@d01av04.pok.ibm.com> From: Todd Lipcon Date: Tue, 23 Feb 2016 16:04:56 -0800 Message-ID: Subject: Re: Passing DataLayout to Module/Function Pass Manager of LLVM To: Tim Armstrong Cc: dev@impala.incubator.apache.org, nishidha panpaliya , Silvius Rus , Sudarshan Jagadale Content-Type: multipart/alternative; boundary=001a1140711c1cef51052c78d27f --001a1140711c1cef51052c78d27f Content-Type: text/plain; charset=UTF-8 You might consider skipping 3.7 and going right to 3.8. It's in its second release candidate and should be released in the next week or so. -Todd On Tue, Feb 23, 2016 at 3:52 PM, Tim Armstrong wrote: > Hi Nishidha, > I'm going to spend some time on the LLVM 3.7 upgrade, likely next week, > once we finish up work on our next release. If you have a patch you are > able to share now it would be interesting to compare. > > It looks like I probably have a bit of work to get everything working > correctly in LLVM 3.7 and to validate the performance. > > Cheers, > TIm > > On Fri, Feb 19, 2016 at 2:36 AM, Nishidha Panpaliya > wrote: > >> Thanks Todd for this additional information. I'll definitely check this >> once I'm done with porting Impala successfully. >> >> Thanks again. >> Nishidha >> >> [image: Inactive hide details for Todd Lipcon ---02/19/2016 02:08:42 >> AM---On Thu, Feb 18, 2016 at 5:16 AM, Nishidha Panpaliya > Lipcon ---02/19/2016 02:08:42 AM---On Thu, Feb 18, 2016 at 5:16 AM, >> Nishidha Panpaliya wrote: >> >> From: Todd Lipcon >> To: Nishidha Panpaliya/Austin/Contr/IBM@IBMUS >> Cc: dev@impala.incubator.apache.org, nishidha panpaliya < >> nishidha27@gmail.com>, Silvius Rus , Sudarshan >> Jagadale/Austin/Contr/IBM@IBMUS >> Date: 02/19/2016 02:08 AM >> >> Subject: Re: Passing DataLayout to Module/Function Pass Manager of LLVM >> ------------------------------ >> >> >> >> On Thu, Feb 18, 2016 at 5:16 AM, Nishidha Panpaliya < >> *nishidha@us.ibm.com* > wrote: >> >> Hi Todd, >> >> Thanks a lot. This really helped me. >> >> So, in case I can simply ignore module->setDataLayout(...) as it is >> already set in it once. In my case, with LLVM 3.3, datalayout was added as >> Pass to ModulePassManager and FunctionPassManager, which now is not needed, >> as it is already set in the module object being used by these passmanagers. >> Please confirm my understanding. >> >> Also, it seems in your module_builder.cc, you are continuing using >> PassManagers which are made as legacy now in LLVM 3.7. I hope it is okay to >> use those legacy PassManagers instead of new PassManagers in >> IR/PassManager.h. >> >> >> >> I haven't followed this API change closely -- I didn't realize that >> PassManagers are legacy now. It seems like our codegen is working, though :) >> >> One thing to be aware of is that some inlining heuristics or thresholds >> changed with our upgrade. We had to do some patches to get the generated >> code back to the original performance. So, make sure you benchmark >> carefully and/or inspect the generated machine code for unwanted call >> instructions. (in the Kudu code we have a -codegen_dump_mc flag to allow >> dumping the asm, not sure if Impala has the same) >> >> -Todd >> >> >> [image: Inactive hide details for Todd Lipcon ---02/17/2016 11:45:53 >> PM---Regarding the DataLayout question, here's how we handle it wi]Todd >> Lipcon ---02/17/2016 11:45:53 PM---Regarding the DataLayout question, >> here's how we handle it with LLVM 3.7 in Kudu: >> >> From: Todd Lipcon <*todd@cloudera.com* > >> To: *dev@impala.incubator.apache.org* >> >> Cc: Silvius Rus <*srus@cloudera.com* >, nishidha >> panpaliya <*nishidha27@gmail.com* >, Nishidha >> Panpaliya/Austin/Contr/IBM@IBMUS, Sudarshan >> Jagadale/Austin/Contr/IBM@IBMUS >> Date: 02/17/2016 11:45 PM >> Subject: Re: Passing DataLayout to Module/Function Pass Manager of >> LLVM >> ------------------------------ >> >> >> >> >> Regarding the DataLayout question, here's how we handle it with LLVM >> 3.7 in Kudu: >> >> >> *https://github.com/cloudera/kudu/blob/master/src/kudu/codegen/module_builder.cc#L267* >> >> >> You can see the diff in this mega commit: >> >> *https://github.com/cloudera/kudu/commit/9806863e78107505a622b44112a897189d9b3c24* >> >> >> On Wed, Feb 17, 2016 at 10:08 AM, Henry Robinson <*henry@cloudera.com* >> > wrote: >> > (Moving this conversation to *dev@impala.incubator.apache.org* >> , >> > *impala-dev@cloudera.org* to bcc:) >> > >> > On 17 February 2016 at 09:13, Silvius Rus <*srus@cloudera.com* >> > wrote: >> > >> >> Hey Nishidha, >> >> >> >> Would you be interested in contributing the changes you've made so >> far to >> >> the Impala ASF project? It's easier to get help in context if you >> post a >> >> patch for review. Upgrading to LLVM 3.7 would be beneficial to >> the project >> >> in general, so I think others will jump in to help. >> >> >> >> *https://github.com/cloudera/Impala/wiki/Contributing-to-Impala* >> >> >> >> >> Silvius >> >> >> >> On Wed, Feb 17, 2016 at 5:00 AM, nishidha panpaliya < >> *nishidha27@gmail.com* > >> >> wrote: >> >> >> >>> Alright Tim. Thanks for the reply. >> >>> >> >>> Regards, >> >>> Nishidha >> >>> >> >>> >> >>> On Tuesday, 16 February 2016 19:16:34 UTC+5:30, nishidha >> panpaliya wrote: >> >>>> >> >>>> Hello, >> >>>> >> >>>> In Impala source code, I've encountered a place in >> >>>> be/src/codegen/llvm-codegen.cc where DataLayout's pointer is >> passed to >> >>>> PassManager::addPass method. >> >>>> >> >>>> module_pass_manager->add(new DataLayout(data_layout_str)); >> >>>> fn_pass_manager->add(new DataLayout(data_layout_str)); >> >>>> >> >>>> >> >>>> *Note*: addPass method is also changed to add in LLVM 3.7. >> >>>> >> >>>> I wanted to understand what exactly these two lines are doing. >> What >> >>>> would be the impact if they are commented/removed? And if there >> is any test >> >>>> coverage for this? >> >>>> >> >>>> My rationale behind all these questions is to port Impala on >> ppc64le, >> >>>> I'd to upgrade LLVM 3.3 to 3.7. And in LLVM 3.7, DataLayout is >> not derived >> >>>> from class Pass and hence these lines do not compile with LLVM >> 3.7. So, I >> >>>> need to either find equivalent of this or have to remove. >> >>>> >> >>>> I'll be grateful to you if you could provide some insights here. >> >>>> >> >>>> Thanks in advance, >> >>>> Nishidha >> >>>> >> >>>> -- >> >>> You received this message because you are subscribed to the >> Google Groups >> >>> "Impala Dev" group. >> >>> To unsubscribe from this group and stop receiving emails from it, >> send an >> >>> email to *impala-dev+unsubscribe@cloudera.org* >> . >> >>> >> >> >> >> -- >> >> You received this message because you are subscribed to the Google >> Groups >> >> "Impala Dev" group. >> >> To unsubscribe from this group and stop receiving emails from it, >> send an >> >> email to *impala-dev+unsubscribe@cloudera.org* >> . >> >> >> > >> > >> > >> > -- >> > Henry Robinson >> > Software Engineer >> > Cloudera >> > *415-994-6679* <415-994-6679> >> >> >> >> -- >> Todd Lipcon >> Software Engineer, Cloudera >> >> >> >> >> >> >> >> -- >> Todd Lipcon >> Software Engineer, Cloudera >> >> > -- Todd Lipcon Software Engineer, Cloudera --001a1140711c1cef51052c78d27f--