Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id AD34C200C7B for ; Sat, 20 May 2017 21:45:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id ABB5B160BBE; Sat, 20 May 2017 19:45:22 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id F2F91160BA7 for ; Sat, 20 May 2017 21:45:21 +0200 (CEST) Received: (qmail 27514 invoked by uid 500); 20 May 2017 19:45:21 -0000 Mailing-List: contact reviews-help@impala.incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Delivered-To: mailing list reviews@impala.incubator.apache.org Received: (qmail 27503 invoked by uid 99); 20 May 2017 19:45:20 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 20 May 2017 19:45:20 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 83E85C1EE7 for ; Sat, 20 May 2017 19:45:20 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 0.362 X-Spam-Level: X-Spam-Status: No, score=0.362 tagged_above=-999 required=6.31 tests=[RDNS_DYNAMIC=0.363, SPF_PASS=-0.001] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id UxVI3JSgzDIJ for ; Sat, 20 May 2017 19:45:19 +0000 (UTC) Received: from ip-10-146-233-104.ec2.internal (ec2-75-101-130-251.compute-1.amazonaws.com [75.101.130.251]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 75C835F521 for ; Sat, 20 May 2017 19:45:19 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by ip-10-146-233-104.ec2.internal (8.14.4/8.14.4) with ESMTP id v4KJjIF8019508; Sat, 20 May 2017 19:45:18 GMT Date: Sat, 20 May 2017 19:45:18 +0000 From: "Michael Ho (Code Review)" To: impala-cr@cloudera.com, reviews@impala.incubator.apache.org Message-ID: Reply-To: kwho@cloudera.com X-Gerrit-MessageType: newchange Subject: =?UTF-8?Q?=5BImpala-ASF-CR=5D_IMPALA-4164=3A_Use_inline_hints_instead_of_always-inline=0A?= X-Gerrit-Change-Id: I2d87ae8d222b415587e7320cb9072e4a8d6615ce X-Gerrit-ChangeURL: X-Gerrit-Commit: e48a6d7da2e70a10e6bd394db6909d8f57f6d6b7 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.12.7 archived-at: Sat, 20 May 2017 19:45:22 -0000 Michael Ho has uploaded a new change for review. http://gerrit.cloudera.org:8080/6941 Change subject: IMPALA-4164: Use inline hints instead of always-inline ...................................................................... IMPALA-4164: Use inline hints instead of always-inline When generating IR functions during codegen, we used to always tag the functions with the "AlwaysInline" attribute. That potentially leads to excessive inlining, leading to very long optimization / compilation time with marginal performance benefit at runtime. One of the reasons for doing it was that the "target-cpu" and "target-features" attributes are missing in the generated IR functions so the LLVM inliner considers them incompatible with the cross-compiled functions. As a result, the inliner will not inline the generated IR functions into cross-compiled functions unless we put the "AlwaysInline" attributes with the generated IR functions. This change fixes the problem above by adding the "target-cpu" and "target-features" attributes to the generated IR functions. In addition, we now switch to using "InlineHint" attribute in place of "AlwaysInline" and let LLVM make the decision of whether it's sensible to inline a function. With this change, the codegen time of a query with a long predicate went from 15s to 4s and the overall runtime went from 19s to 8s. Change-Id: I2d87ae8d222b415587e7320cb9072e4a8d6615ce --- M be/src/codegen/llvm-codegen.cc M be/src/codegen/llvm-codegen.h A testdata/workloads/targeted-perf/queries/primitive_long_predicate.test 3 files changed, 307 insertions(+), 6 deletions(-) git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/41/6941/1 -- To view, visit http://gerrit.cloudera.org:8080/6941 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: newchange Gerrit-Change-Id: I2d87ae8d222b415587e7320cb9072e4a8d6615ce Gerrit-PatchSet: 1 Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-Owner: Michael Ho