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 3009119E5E for ; Sat, 23 Apr 2016 22:05:55 +0000 (UTC) Received: (qmail 39904 invoked by uid 500); 23 Apr 2016 22:05:54 -0000 Delivered-To: apmail-impala-dev-archive@impala.apache.org Received: (qmail 39858 invoked by uid 500); 23 Apr 2016 22:05:54 -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 39847 invoked by uid 99); 23 Apr 2016 22:05:54 -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; Sat, 23 Apr 2016 22:05:54 +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 36966C0D3B for ; Sat, 23 Apr 2016 22:05:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-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 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 sgHkCcwOWYWF for ; Sat, 23 Apr 2016 22:05:51 +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 mx2-lw-eu.apache.org (ASF Mail Server at mx2-lw-eu.apache.org) with ESMTPS id C1FD05F574 for ; Sat, 23 Apr 2016 22:05:50 +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 u3NM5hee022868; Sat, 23 Apr 2016 22:05:43 GMT Message-Id: <201604232205.u3NM5hee022868@ip-10-146-233-104.ec2.internal> Date: Sat, 23 Apr 2016 22:05:43 +0000 From: "Internal Jenkins (Code Review)" To: Tim Armstrong , impala-cr@cloudera.com, dev@impala.incubator.apache.org X-Gerrit-MessageType: merged Subject: =?UTF-8?Q?[Impala-CR](cdh5-trunk)_IMPALA-775=2CIMPALA-3374:_Upgrade_LLVM_to_3.8.0=0A?= X-Gerrit-Change-Id: I17d7afd05ad3b472a0bfe035bfc3daada5597b2d X-Gerrit-ChangeURL: X-Gerrit-Commit: 1e77048be06aeb511e3483193db4257c8dbc7cf3 In-Reply-To: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Content-Disposition: inline User-Agent: Gerrit/2.10-rc0 Internal Jenkins has submitted this change and it was merged. Change subject: IMPALA-775,IMPALA-3374: Upgrade LLVM to 3.8.0 ...................................................................... IMPALA-775,IMPALA-3374: Upgrade LLVM to 3.8.0 This requires various changes for Impala to be fully functional with the new version of LLVM. The original JIT was removed from LLVM, we need to switch to the new MCJIT API and implementation. MCJIT only supports module-at-a-time compilation, so the module must be finalised before any compilation happens. We did't depend on the old behaviour deeply, but various small fixes were required. MCJIT requires that every IR module has a name. We relied on the old JIT's workaround for the __dso_handle symbol, which we have to emulate for MCJIT with a customer memory manager until we can get rid of global initialisers in cross-compiled code. LLVM made a number of incompatible API changes and reorganised headers. Clang took over responsibility for padding structs by marking structs as packed and inserting bytes so that members are aligned correctly (previously it relies LLVM aligning struct members based on the target's alignment rules). This means Impala also needs to manually pad its structs since clang-emitted structs look to LLVM like they have do not need to be inlined. Our inlining pass would require some modification to work and is redundant with LLVM's inlining pass, so was removed along with the unused subexpr elimination pass. LLVM now depends on another system library libtinfo, so we use llvm-config to get the required system libs directly. There were various issues with __builtin_add_overflow and __builtin_mul_overflow that are newly available in LLVM 3.8. First, LLVM emitted a call to a function in libclang_rt, which we don't link in and has symbols that conflict with the gcc runtime library. Second, the performance actually regressed by using the builtins (I tested this manually by copying across the definition of the required function). Change-Id: I17d7afd05ad3b472a0bfe035bfc3daada5597b2d Reviewed-on: http://gerrit.cloudera.org:8080/2486 Reviewed-by: Tim Armstrong Tested-by: Internal Jenkins --- M be/CMakeLists.txt M be/src/benchmarks/hash-benchmark.cc M be/src/benchmarks/overflow-benchmark.cc M be/src/codegen/CMakeLists.txt M be/src/codegen/codegen-anyval.cc M be/src/codegen/instruction-counter-test.cc M be/src/codegen/llvm-codegen-test.cc M be/src/codegen/llvm-codegen.cc M be/src/codegen/llvm-codegen.h A be/src/codegen/mcjit-mem-mgr.h D be/src/codegen/subexpr-elimination.cc D be/src/codegen/subexpr-elimination.h M be/src/exec/aggregation-node.cc M be/src/exec/hash-join-node.cc M be/src/exec/hash-table.cc M be/src/exec/hdfs-avro-scanner.cc M be/src/exec/hdfs-scanner.cc M be/src/exec/old-hash-table.cc M be/src/exec/partitioned-aggregation-node.cc M be/src/exec/partitioned-hash-join-node.cc M be/src/exec/text-converter.cc M be/src/exprs/expr-codegen-test.cc M be/src/exprs/expr.cc M be/src/exprs/scalar-fn-call.cc M be/src/exprs/slot-ref.cc M be/src/runtime/decimal-value.inline.h M be/src/runtime/descriptors.cc M be/src/runtime/descriptors.h M be/src/runtime/lib-cache.cc M be/src/runtime/runtime-state.cc M bin/bootstrap_toolchain.py M bin/impala-config.sh M cmake_modules/FindLlvm.cmake 33 files changed, 545 insertions(+), 757 deletions(-) Approvals: Internal Jenkins: Verified Tim Armstrong: Looks good to me, approved -- To view, visit http://gerrit.cloudera.org:8080/2486 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-MessageType: merged Gerrit-Change-Id: I17d7afd05ad3b472a0bfe035bfc3daada5597b2d Gerrit-PatchSet: 16 Gerrit-Project: Impala Gerrit-Branch: cdh5-trunk Gerrit-Owner: Tim Armstrong Gerrit-Reviewer: Dan Hecht Gerrit-Reviewer: Internal Jenkins Gerrit-Reviewer: Michael Ho Gerrit-Reviewer: Skye Wanderman-Milne Gerrit-Reviewer: Tim Armstrong