Update to LLVM 16.0.1
This commit is contained in:
parent
57ad6493ac
commit
24ccf3d9c6
@ -1,26 +0,0 @@
|
||||
From 6772966dcdf5175c517832c1b2352b4fcd1d6b16 Mon Sep 17 00:00:00 2001
|
||||
From: Jay Foad <jay.foad@amd.com>
|
||||
Date: Thu, 26 Jan 2023 17:27:56 +0000
|
||||
Subject: [PATCH] [flang] Fix dereference of std::optional with no value
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D142648
|
||||
---
|
||||
flang/lib/Optimizer/Builder/Character.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/flang/lib/Optimizer/Builder/Character.cpp b/flang/lib/Optimizer/Builder/Character.cpp
|
||||
index de4a5579620d..aa455e768a08 100644
|
||||
--- a/flang/lib/Optimizer/Builder/Character.cpp
|
||||
+++ b/flang/lib/Optimizer/Builder/Character.cpp
|
||||
@@ -422,7 +422,7 @@ void fir::factory::CharacterExprHelper::createAssign(
|
||||
(lhsCstLen && rhsCstLen && *lhsCstLen == *rhsCstLen) ||
|
||||
(rhs.getLen() == lhs.getLen());
|
||||
|
||||
- if (compileTimeSameLength && *lhsCstLen == 1) {
|
||||
+ if (compileTimeSameLength && lhsCstLen && *lhsCstLen == 1) {
|
||||
createLengthOneAssign(lhs, rhs);
|
||||
return;
|
||||
}
|
||||
--
|
||||
2.39.2
|
||||
|
@ -1,95 +0,0 @@
|
||||
From 02445263e2f533573a935c1bd502d848bbe6bb27 Mon Sep 17 00:00:00 2001
|
||||
From: Slava Zakharin <szakharin@nvidia.com>
|
||||
Date: Thu, 26 Jan 2023 14:20:47 -0800
|
||||
Subject: [PATCH] [flang] Fixed restrictions checking for OpenACC
|
||||
loop-associated constructs.
|
||||
|
||||
CheckDoConcurrentClauseRestriction and CheckTileClauseRestriction expect
|
||||
that the construct has associated DoConstruct, while it is not set
|
||||
when the do-loop has no loop control. The change is to skip the clauses
|
||||
checks, when the do-loop does not have the loop control.
|
||||
|
||||
An alternative fix would be to associate the DoConstruct even when
|
||||
the do-loop has no loop control and let Check*ClauseRestriction run their
|
||||
checks, but I am not sure if associating invalid DoConstruct is a good idea.
|
||||
|
||||
This fixes failure in Semantics/OpenACC/acc-canonicalization-validity.f90
|
||||
reported in D142279.
|
||||
|
||||
Reviewed By: clementval
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D142652
|
||||
---
|
||||
flang/lib/Semantics/canonicalize-acc.cpp | 41 ++++++++++++------------
|
||||
1 file changed, 20 insertions(+), 21 deletions(-)
|
||||
|
||||
diff --git a/flang/lib/Semantics/canonicalize-acc.cpp b/flang/lib/Semantics/canonicalize-acc.cpp
|
||||
index 855f62f53ff8..5afae172cfaa 100644
|
||||
--- a/flang/lib/Semantics/canonicalize-acc.cpp
|
||||
+++ b/flang/lib/Semantics/canonicalize-acc.cpp
|
||||
@@ -127,17 +127,17 @@ private:
|
||||
nextIt = it;
|
||||
if (++nextIt != block.end()) {
|
||||
if (auto *doCons{parser::Unwrap<parser::DoConstruct>(*nextIt)}) {
|
||||
- if (doCons->GetLoopControl()) {
|
||||
- // move DoConstruct
|
||||
- std::get<std::optional<parser::DoConstruct>>(x.t) =
|
||||
- std::move(*doCons);
|
||||
- nextIt = block.erase(nextIt);
|
||||
- } else {
|
||||
+ if (!doCons->GetLoopControl()) {
|
||||
messages_.Say(dir.source,
|
||||
"DO loop after the %s directive must have loop control"_err_en_US,
|
||||
parser::ToUpperCaseLetters(dir.source.ToString()));
|
||||
+ return;
|
||||
}
|
||||
|
||||
+ // move DoConstruct
|
||||
+ std::get<std::optional<parser::DoConstruct>>(x.t) = std::move(*doCons);
|
||||
+ nextIt = block.erase(nextIt);
|
||||
+
|
||||
CheckDoConcurrentClauseRestriction<parser::OpenACCLoopConstruct,
|
||||
parser::AccBeginLoopDirective>(x);
|
||||
CheckTileClauseRestriction<parser::OpenACCLoopConstruct,
|
||||
@@ -173,24 +173,23 @@ private:
|
||||
nextIt = it;
|
||||
if (++nextIt != block.end()) {
|
||||
if (auto *doCons{parser::Unwrap<parser::DoConstruct>(*nextIt)}) {
|
||||
- if (doCons->GetLoopControl()) {
|
||||
- // move DoConstruct
|
||||
- std::get<std::optional<parser::DoConstruct>>(x.t) =
|
||||
- std::move(*doCons);
|
||||
- nextIt = block.erase(nextIt);
|
||||
- // try to match AccEndCombinedDirective
|
||||
- if (nextIt != block.end()) {
|
||||
- if (auto *endDir{
|
||||
- parser::Unwrap<parser::AccEndCombinedDirective>(*nextIt)}) {
|
||||
- std::get<std::optional<parser::AccEndCombinedDirective>>(x.t) =
|
||||
- std::move(*endDir);
|
||||
- block.erase(nextIt);
|
||||
- }
|
||||
- }
|
||||
- } else {
|
||||
+ if (!doCons->GetLoopControl()) {
|
||||
messages_.Say(dir.source,
|
||||
"DO loop after the %s directive must have loop control"_err_en_US,
|
||||
parser::ToUpperCaseLetters(dir.source.ToString()));
|
||||
+ return;
|
||||
+ }
|
||||
+ // move DoConstruct
|
||||
+ std::get<std::optional<parser::DoConstruct>>(x.t) = std::move(*doCons);
|
||||
+ nextIt = block.erase(nextIt);
|
||||
+ // try to match AccEndCombinedDirective
|
||||
+ if (nextIt != block.end()) {
|
||||
+ if (auto *endDir{
|
||||
+ parser::Unwrap<parser::AccEndCombinedDirective>(*nextIt)}) {
|
||||
+ std::get<std::optional<parser::AccEndCombinedDirective>>(x.t) =
|
||||
+ std::move(*endDir);
|
||||
+ block.erase(nextIt);
|
||||
+ }
|
||||
}
|
||||
|
||||
CheckDoConcurrentClauseRestriction<parser::OpenACCCombinedConstruct,
|
||||
--
|
||||
2.39.2
|
||||
|
@ -1,28 +0,0 @@
|
||||
From e054e0da9fd7055142188036ee713e8c0697324b Mon Sep 17 00:00:00 2001
|
||||
From: Slava Zakharin <szakharin@nvidia.com>
|
||||
Date: Thu, 26 Jan 2023 14:17:13 -0800
|
||||
Subject: [PATCH] [flang] Fixed uninitialized std::unique_ptr dereference.
|
||||
|
||||
This fixes unittest failures reported in D142279:
|
||||
flang-Unit :: Frontend/./FlangFrontendTests/5/7
|
||||
flang-Unit :: Frontend/./FlangFrontendTests/6/7
|
||||
---
|
||||
flang/lib/Frontend/FrontendActions.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/flang/lib/Frontend/FrontendActions.cpp b/flang/lib/Frontend/FrontendActions.cpp
|
||||
index 927591cc8e93..7e41565a602c 100644
|
||||
--- a/flang/lib/Frontend/FrontendActions.cpp
|
||||
+++ b/flang/lib/Frontend/FrontendActions.cpp
|
||||
@@ -781,7 +781,7 @@ void CodeGenAction::executeAction() {
|
||||
llvmModule->setDataLayout(tm->createDataLayout());
|
||||
|
||||
// Run LLVM's middle-end (i.e. the optimizer).
|
||||
- runOptimizationPipeline(*os);
|
||||
+ runOptimizationPipeline(ci.isOutputStreamNull() ? *os : ci.getOutputStream());
|
||||
|
||||
if (action == BackendActionTy::Backend_EmitLL) {
|
||||
llvmModule->print(ci.isOutputStreamNull() ? *os : ci.getOutputStream(),
|
||||
--
|
||||
2.39.2
|
||||
|
12
flang.spec
12
flang.spec
@ -1,6 +1,6 @@
|
||||
%global maj_ver 16
|
||||
%global min_ver 0
|
||||
%global patch_ver 0
|
||||
%global patch_ver 1
|
||||
#global rc_ver 4
|
||||
%global flang_version %{maj_ver}.%{min_ver}.%{patch_ver}
|
||||
%global flang_srcdir flang-%{flang_version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
@ -12,7 +12,7 @@
|
||||
|
||||
Name: flang
|
||||
Version: %{flang_version}%{?rc_ver:~rc%{rc_ver}}
|
||||
Release: 3%{?dist}
|
||||
Release: 1%{?dist}
|
||||
Summary: a Fortran language front-end designed for integration with LLVM
|
||||
|
||||
License: Apache-2.0 WITH LLVM-exception
|
||||
@ -43,11 +43,6 @@ Patch5: 0001-Match-Fedora-s-value-for-CLANG_DEFAULT_PIE_ON_LINUX.patch
|
||||
# Fedora and RHEL use a different triple for ppc64le
|
||||
Patch6: 0001-PowerPC-Flang-Fix-triple.patch
|
||||
|
||||
# Backports from LLVM 17:
|
||||
Patch20: 0001-flang-Fixed-restrictions-checking-for-OpenACC-loop-a.patch
|
||||
Patch21: 0001-flang-Fixed-uninitialized-std-unique_ptr-dereference.patch
|
||||
Patch22: 0001-flang-Fix-dereference-of-std-optional-with-no-value.patch
|
||||
|
||||
%{lua:
|
||||
|
||||
-- Return the maximum number of parallel jobs a build can run based on the
|
||||
@ -280,6 +275,9 @@ export LD_LIBRARY_PATH=%{_builddir}/%{flang_srcdir}/%{_build}/lib
|
||||
%doc %{_pkgdocdir}/html/
|
||||
|
||||
%changelog
|
||||
* Thu Apr 13 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.1-1
|
||||
- Update to LLVM 16.0.1
|
||||
|
||||
* Thu Apr 06 2023 Tulio Magno Quites Machado Filho <tuliom@redhat.com> - 16.0.0-3
|
||||
- Set the amount of jobs dynamically
|
||||
|
||||
|
4
sources
4
sources
@ -1,3 +1,3 @@
|
||||
SHA512 (flang-16.0.0.src.tar.xz) = 3d7ebe4eb80336a28fe8d4ab5b9e006b93184f77a6865391e2d5d21e882814b789aeaca719b0c347e49c886cba0b7cee2a5d478a7325c4921c2b6aa9ee18b99d
|
||||
SHA512 (flang-16.0.0.src.tar.xz.sig) = 06e677484890b668764d8824cfb235ae686fd378139741d75e5b96bcb890c887cad70bce90c6fc8ac4c4c57774c45836883a8a1833975b7d9b111b54d2d2e7d2
|
||||
SHA512 (flang-16.0.1.src.tar.xz) = b6f00fd176d81b97bf5dac2af6e178bafe751ce6f3c1281acff539bfca8437a32e8e423816c300e163b54916993bd5d157d868f9e849dbbf6a5ce04848b07180
|
||||
SHA512 (flang-16.0.1.src.tar.xz.sig) = 0aaf3b5007597e5a79481fa549bb657d671706aacfe1b405ff4a19cee0ab1680c05eda60afd75f317fc26fe18d8b7963b06dfe68eae7bea51ecaea3aee784a91
|
||||
SHA512 (Options.td) = aac6bae599ff35c9e94f83f97f6d118ee55d385398195d59ac16b9787989015e7fe108d77153c1f410206dc060f695790dee2113e41ac353d73c4740c0ed518f
|
||||
|
Loading…
Reference in New Issue
Block a user