From nobody Mon Feb 21 20:13:50 2022 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id BC32919D453F; Mon, 21 Feb 2022 20:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4K2YR24x30z3qCp; Mon, 21 Feb 2022 20:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645474430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kj0YeRdxdXqJD3pjzKbbzyOklRsZy927L0GCplYrTUo=; b=x66sA6xspJ4jwg2r9k7vjM3AtXOXAwpqEvJt153v3Ptrqf/qcpgFzn3QOBHzccEMNk2RL+ 6dNpOJNby+jWRqEY+0lw8oLiU8uNSQEiCiUM9mFLjUai0ub5/Y9Pe3VXr8WWrjFD8+wHRL Y1ezQXzN0y/rCDlQjVQhcn7ysG6TYnvXttfr4b8sEG5+jWaqXw7kQRqv8LYED5LhOQ6zLg TEC6mkCWoDxO5PsrJ7rcglIxWf2uGgQOsfEt23ca6RE8W/CzkPTEbshMH/rI8qx1JsXUUD DJ12JPq5pV67wOXfZoZDh74zEZKVHk6hLqVLH9nxvneWvGANFpsXPdH7+ZhaHA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 8969416EAB; Mon, 21 Feb 2022 20:13:50 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 21LKDoaP017614; Mon, 21 Feb 2022 20:13:50 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21LKDo7P017613; Mon, 21 Feb 2022 20:13:50 GMT (envelope-from git) Date: Mon, 21 Feb 2022 20:13:50 GMT Message-Id: <202202212013.21LKDo7P017613@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Joseph Mingrone Subject: git: 73b83478c14b - main - biology/hyphy: Fix build with clang 13.0.0 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jrm X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 73b83478c14b99126db25691ed42c50a36f9c005 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645474430; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=kj0YeRdxdXqJD3pjzKbbzyOklRsZy927L0GCplYrTUo=; b=aSUTfx2yix12f4iD8Zv80eIJrxHIhya2HxwV7Rb5PEsGxm/c6DrVq0iFEfdkauV9SmLcXV pOez7wFantFDdJz7zXF3j773hZoP30TQiVBQjQn9x4CokfdEC5scUlcQKduKv3OsSoNevy 7MaQ4dbiYVl7wBA2FpIlKv0udPcxTelTa0DgAb3RwAVYRUNoFkT59NZCw6ZDEngVlYi2ea mU/FCqV4pQ9wcPZr4p1uXUIfp/SaaU19dyum4qyX7JS1y23Vqr/kP/fpY7kYSD5YnxB/U9 fEOM8wlzlFiodzZFgOWT69M0EskisEQUPOcwYw8Dx0wdnFFEiI5aONK7+0B57g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645474430; a=rsa-sha256; cv=none; b=PG2plQzLiIO/iWyivLRKf3coKdeS9YXccE7LiQvyx9QChEbR3F2TBSv1UiO41ZXyVBKMza y5FQBFar4oficbzBWIZXrB1+s7WHdkZYatQSJSd+MO+1/pxKqZ6Vm0HS+LZtjxPDAJwKzN XQp1hmVoIiRwCKtizrn2jY0XmyFYX4wQxnMYPS12/f5hm8iadOLgetYjhsT/a0/vtwUObJ FZVVa2ciFeRi1uKNACjFV1BXIcaXUNxCqy5QSsUIZgd3yV5FAJ8vhtm1Iio1KoqW+mtQd0 Pm0PjzSu6KZyAc1Nzd4I9ZSKDib+TGTfC2JiQqg+XA0+LoOBlOgX+lyBlNwBlQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jrm: URL: https://cgit.FreeBSD.org/ports/commit/?id=73b83478c14b99126db25691ed42c50a36f9c005 commit 73b83478c14b99126db25691ed42c50a36f9c005 Author: Joseph Mingrone AuthorDate: 2022-02-21 19:57:10 +0000 Commit: Joseph Mingrone CommitDate: 2022-02-21 20:13:16 +0000 biology/hyphy: Fix build with clang 13.0.0 clang 13 complains about duplicate loop unrolling pragmas for clang and CGG. According to [1], clang supports #pragma GCC unroll with identical semantics to #pragma clang loop unroll, so remove instances of #pragma clang loop unroll and #pragma unroll when they appear with #pragma GCC unroll for the same loop. [1] https://clang.llvm.org/docs/AttributeReference.html#pragma-unroll-pragma-nounroll Sponsored by: The FreeBSD Foundation --- .../patch-src_core_include_function__templates.h | 10 ++ biology/hyphy/files/patch-src_core_matrix.cpp | 106 ++++++++++++++ .../hyphy/files/patch-src_core_tree__evaluator.cpp | 154 +++++++++++++++++++++ 3 files changed, 270 insertions(+) diff --git a/biology/hyphy/files/patch-src_core_include_function__templates.h b/biology/hyphy/files/patch-src_core_include_function__templates.h new file mode 100644 index 000000000000..7ca06b1cc56a --- /dev/null +++ b/biology/hyphy/files/patch-src_core_include_function__templates.h @@ -0,0 +1,10 @@ +--- src/core/include/function_templates.h.orig 2022-02-21 19:44:45 UTC ++++ src/core/include/function_templates.h +@@ -156,7 +156,6 @@ void ArrayForEach(ARG_TYPE *array, unsigned long dimen + template + void InitializeArray(ARG_TYPE *array, unsigned long dimension, + ARG_TYPE &&value) { +- #pragma clang loop unroll_count(8) + #pragma GCC unroll 4 + for (unsigned long i = 0UL; i < dimension; i++) { + array[i] = value; diff --git a/biology/hyphy/files/patch-src_core_matrix.cpp b/biology/hyphy/files/patch-src_core_matrix.cpp new file mode 100644 index 000000000000..0d5720b2751b --- /dev/null +++ b/biology/hyphy/files/patch-src_core_matrix.cpp @@ -0,0 +1,106 @@ +--- src/core/matrix.cpp.orig 2022-02-21 19:46:34 UTC ++++ src/core/matrix.cpp +@@ -3391,7 +3391,6 @@ void _Matrix::AddMatrix (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + #pragma GCC ivdep + #pragma ivdep + for (long idx = 0; idx < upto; idx+=16) { +@@ -3410,7 +3409,6 @@ void _Matrix::AddMatrix (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + #pragma GCC ivdep + #pragma ivdep + for (long idx = 0; idx < upto; idx+=8) { +@@ -3440,7 +3438,6 @@ void _Matrix::AddMatrix (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long idx = 0; idx < upto; idx+=16) { + CELL_OP (idx); + CELL_OP (idx+4); +@@ -3454,7 +3451,6 @@ void _Matrix::AddMatrix (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + #pragma GCC ivdep + #pragma ivdep + for (long idx = 0; idx < upto; idx+=8) { +@@ -3895,7 +3891,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < vDim; k+=4) { + __m256d D4, B4; + DO_GROUP_OP (D4, B4, k); +@@ -3946,7 +3941,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < vDim; k+=2) { + __m128d D4, B4; + DO_GROUP_OP1 (D4, B4, k); +@@ -3998,7 +3992,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < vDim; k+=2) { + float64x2_t D4, B4; + DO_GROUP_OP1 (D4, B4, k); +@@ -4163,7 +4156,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < dimm4; k+=4) { + __m256d D4, B4; + DO_GROUP_OP (D4, B4, k); +@@ -4271,7 +4263,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < dimm4; k+=2) { + __m128d D4, B4; + DO_GROUP_OP1 (D4, B4, k); +@@ -4380,7 +4371,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < dimm4; k+=2) { + float64x2_t D4, B4; + DO_GROUP_OP1 (D4, B4, k); +@@ -4441,7 +4431,6 @@ void _Matrix::Multiply (_Matrix& storage, _Matrix + #pragma GCC unroll 8 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0, column = j*hDim; k < vDim; k++, column ++) { + resCell += row[k] * secondArg.theData [column]; + } +@@ -5822,7 +5811,6 @@ _Matrix* _Matrix::Exponentiate (hyFloat scale_to, b + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long c = from; c < compressedIndex[r]; c++, i++) { + theIndex[i] = compressedIndex[c+hDim] * vDim + r; + } +@@ -6988,7 +6976,6 @@ hyFloat _Matrix::Sqr (hyFloat* _hprestrict_ sta + #pragma GCC unroll 4 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + #pragma GCC ivdep + #pragma ivdep + for (long k = 0; k < loopBound; k+=4) { diff --git a/biology/hyphy/files/patch-src_core_tree__evaluator.cpp b/biology/hyphy/files/patch-src_core_tree__evaluator.cpp new file mode 100644 index 000000000000..3adcafaf5866 --- /dev/null +++ b/biology/hyphy/files/patch-src_core_tree__evaluator.cpp @@ -0,0 +1,154 @@ +--- src/core/tree_evaluator.cpp.orig 2022-02-21 19:48:41 UTC ++++ src/core/tree_evaluator.cpp +@@ -127,7 +127,6 @@ inline double _sse_sum_2 (__m128d const & x) { + template inline void __ll_handle_matrix_transpose (hyFloat const * __restrict transitionMatrix, hyFloat * __restrict tMatrixT) { + long i = 0L; + for (long r = 0L; r < D; r++) { +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long c = 0L; c < D; c++, i++) { + tMatrixT[c*D+r] = transitionMatrix[i]; +@@ -154,7 +153,6 @@ template inline bool __ll_handle_conditional_a + } + }*/ + +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0L; k < D; k++) { + parentConditionals[k] *= tMatrix[siteState+D*k]; +@@ -172,7 +170,6 @@ template inline bool __ll_handle_conditional_a + } else { + if (tcc) { + if (__builtin_expect((tcc->list_data[currentTCCIndex] & bitMaskArray.masks[currentTCCBit]) > 0 && siteID > siteFrom,0)) { +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0L; k < D; k++) { + childVector[k] = lastUpdatedSite[k]; +@@ -200,7 +197,6 @@ inline bool __ll_handle_conditional_array_initializati + } + if (__builtin_expect(siteState >= 0L,1)) { + // a single character state; sweep down the appropriate column +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0L; k < D; k++) { + parentConditionals[k] *= tMatrix[siteState+D*k]; +@@ -212,7 +208,6 @@ inline bool __ll_handle_conditional_array_initializati + } else { + if (tcc) { + if (__builtin_expect((tcc->list_data[currentTCCIndex] & bitMaskArray.masks[currentTCCBit]) > 0 && siteID > siteFrom,0)) { +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0L; k < D; k++) { + childVector[k] = lastUpdatedSite[k]; +@@ -542,7 +537,6 @@ template inline void __ll_product_sum_loop (hy + #pragma GCC unroll 8 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long c = 0; c < D; c++) + accumulator += tMatrix[c] * childVector[c]; + +@@ -558,7 +552,6 @@ inline void __ll_product_sum_loop_generic (hyFloat con + #pragma GCC unroll 8 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long c = 0; c < D; c++) + accumulator += tMatrix[c] * childVector[c]; + +@@ -595,7 +588,6 @@ template inline void __ll_loop_ha + fprintf (stderr, "UP %ld (%ld) %lg\n", didScale, parentCode, scaler); + }*/ + if (didScale) { +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long c = 0; c < D; c++) { + parentConditionals [c] *= scaler; +@@ -626,7 +618,6 @@ template inline void __ll_loop_ha + }*/ + + if (didScale) { +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long c = 0; c < D; c++) { + parentConditionals [c] *= scaler; +@@ -657,7 +648,6 @@ template inline void __ll_loop_handle_sca + hyFloat scaler = _computeBoostScaler(scalingAdjustments [parentCode*siteCount + siteID] * _lfScalerUpwards, sum, didScale); + + if (didScale) { +- #pragma unroll(8) + #pragma GCC unroll 8 + for (long c = 0; c < D; c++) { + parentConditionals [c] *= scaler; +@@ -679,7 +669,6 @@ template inline void __ll_loop_handle_sca + hyFloat scaler = _computeReductionScaler (scalingAdjustments [parentCode*siteCount + siteID] * _lfScalingFactorThreshold, sum, didScale); + + if (didScale) { +- #pragma unroll(8) + #pragma GCC unroll 8 + for (long c = 0; c < D; c++) { + parentConditionals [c] *= scaler; +@@ -707,7 +696,6 @@ template inline void __ll_loop_handle_leaf_cas + } else { + for (long k = siteFrom; k < siteTo; k++, pp += D) { + hyFloat lsf = localScalingFactor[k]; +-#pragma unroll(4) + #pragma GCC unroll 4 + for (long s = 0; s < D; s++) { + pp[s] = lsf; +@@ -1585,7 +1573,6 @@ hyFloat _TheTree::ComputeTreeBlockByBranch ( + accumulator = rootConditionals[rootIndex + rootState] * theProbs[rootState]; + rootIndex += alphabetDimension; + } else { +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long p = 0; p < alphabetDimension; p++,rootIndex++) { + accumulator += rootConditionals[rootIndex] * theProbs[p]; +@@ -1644,7 +1631,6 @@ template inline bool __lcache_loop_preface (bo + long siteState = lNodeFlags[nodeCode*siteCount + siteOrdering.list_data[siteID]] ; + if (siteState >= 0L) { + unsigned long target_index = siteState; +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0L; k < D; k++, target_index+=D) { + parentConditionals[k] *= tMatrix[target_index]; +@@ -1659,7 +1645,6 @@ template inline bool __lcache_loop_preface (bo + if ((tcc->list_data[currentTCCIndex] & bitMaskArray.masks[currentTCCBit]) > 0 && siteID > siteFrom) + // the value of this conditional vector needs to be copied from a previously stored site + // subtree duplication +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0UL; k < D; k++) { + childVector[k] = lastUpdatedSite[k]; +@@ -1688,7 +1673,6 @@ inline bool __lcache_loop_preface_generic (bool isLeaf + long siteState = lNodeFlags[nodeCode*siteCount + siteOrdering.list_data[siteID]] ; + if (siteState >= 0L) { + unsigned long target_index = siteState; +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0L; k < D; k++, target_index+=D) { + parentConditionals[k] *= tMatrix[target_index]; +@@ -1704,7 +1688,6 @@ inline bool __lcache_loop_preface_generic (bool isLeaf + if ((tcc->list_data[currentTCCIndex] & bitMaskArray.masks[currentTCCBit]) > 0 && siteID > siteFrom) + // the value of this conditional vector needs to be copied from a previously stored site + // subtree duplication +- #pragma unroll(4) + #pragma GCC unroll 4 + for (long k = 0UL; k < D; k++) { + childVector[k] = lastUpdatedSite[k]; +@@ -1966,7 +1949,6 @@ void _TheTree::ComputeBranchCache ( + unsigned long k3 = 0UL; + for (unsigned long k = siteFrom; k < siteTo; k++) { + hyFloat scaler = localScalingFactor[k]; +- #pragma unroll(4) + #pragma GCC unroll 4 + for (unsigned long k2 = 0UL; k2 < alphabetDimension; k2++, k3++) { + parentConditionals [k3] = scaler; +@@ -2474,7 +2456,6 @@ void _TheTree::ComputeBranchCache ( + #pragma GCC unroll 8 + #pragma clang loop vectorize(enable) + #pragma clang loop interleave(enable) +- #pragma clang loop unroll(enable) + for (long k = 0; k < alphabetDimension; k++) { + sum += parentConditionals[k]; + }