import llvm-12.0.1-2.module+el8.5.0+12488+254d2a07
This commit is contained in:
parent
2ae2453e20
commit
cd1dd1bcf8
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
|||||||
SOURCES/llvm-11.0.1.src.tar.xz
|
SOURCES/llvm-12.0.1.src.tar.xz
|
||||||
|
@ -1 +1 @@
|
|||||||
1a911295260d4e41116b72788eb602702b4bb252 SOURCES/llvm-11.0.1.src.tar.xz
|
619fe668e0972d11d0fa2db670a57a42d02fb8ca SOURCES/llvm-12.0.1.src.tar.xz
|
||||||
|
@ -1,48 +0,0 @@
|
|||||||
diff -Naur a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
|
||||||
--- a/llvm/cmake/modules/AddLLVM.cmake 2020-08-20 16:24:59.000000000 +0000
|
|
||||||
+++ b/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 07:09:05.411311520 +0000
|
|
||||||
@@ -760,7 +760,11 @@
|
|
||||||
if(${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
|
||||||
(in_llvm_libs AND "llvm-libraries" IN_LIST LLVM_DISTRIBUTION_COMPONENTS) OR
|
|
||||||
NOT LLVM_DISTRIBUTION_COMPONENTS)
|
|
||||||
- set(export_to_llvmexports EXPORT LLVMExports)
|
|
||||||
+ if (ARG_SHARED)
|
|
||||||
+ set(export_to_llvmexports EXPORT LLVMExports)
|
|
||||||
+ else()
|
|
||||||
+ set(export_to_llvmexports EXPORT LLVMStaticExports)
|
|
||||||
+ endif()
|
|
||||||
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
diff -Naur a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
|
|
||||||
--- a/llvm/cmake/modules/CMakeLists.txt 2020-08-20 16:24:59.000000000 +0000
|
|
||||||
+++ b/llvm/cmake/modules/CMakeLists.txt 2020-09-15 07:09:05.411311520 +0000
|
|
||||||
@@ -79,6 +79,7 @@
|
|
||||||
# source files are put in the same cmake directory.
|
|
||||||
set(LLVM_CONFIG_EXPORTS_FILE "${LLVM_EXPORTS_FILE}")
|
|
||||||
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS};${LLVM_EXPORTS_BUILDTREE_ONLY}")
|
|
||||||
+set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
|
|
||||||
set(llvm_config_include_buildtree_only_exports
|
|
||||||
"include(\"${LLVM_BUILDTREEONLY_EXPORTS_FILE}\")")
|
|
||||||
configure_file(
|
|
||||||
@@ -139,6 +140,8 @@
|
|
||||||
if(llvm_has_exports)
|
|
||||||
install(EXPORT LLVMExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
|
||||||
COMPONENT cmake-exports)
|
|
||||||
+ install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
|
||||||
+ COMPONENT cmake-exports)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
diff -Naur a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
|
|
||||||
--- a/llvm/cmake/modules/LLVMConfig.cmake.in 2020-08-20 16:24:59.000000000 +0000
|
|
||||||
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 07:09:05.411311520 +0000
|
|
||||||
@@ -103,6 +103,8 @@
|
|
||||||
set(LLVM_EXPORTED_TARGETS "@LLVM_CONFIG_EXPORTS@")
|
|
||||||
include("@LLVM_CONFIG_EXPORTS_FILE@")
|
|
||||||
@llvm_config_include_buildtree_only_exports@
|
|
||||||
+
|
|
||||||
+ include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# By creating intrinsics_gen, omp_gen and acc_gen here, subprojects that depend
|
|
@ -1,48 +0,0 @@
|
|||||||
diff -Naur a/llvm/cmake/modules/AddLLVM.cmake b/llvm/cmake/modules/AddLLVM.cmake
|
|
||||||
--- a/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 09:12:47.596424499 +0000
|
|
||||||
+++ b/llvm/cmake/modules/AddLLVM.cmake 2020-09-15 13:36:03.509429423 +0000
|
|
||||||
@@ -1235,7 +1235,12 @@
|
|
||||||
set(export_to_llvmexports)
|
|
||||||
if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR
|
|
||||||
NOT LLVM_DISTRIBUTION_COMPONENTS)
|
|
||||||
- set(export_to_llvmexports EXPORT LLVMExports)
|
|
||||||
+ if (${name} STREQUAL "not" OR ${name} STREQUAL "count" OR
|
|
||||||
+ ${name} STREQUAL "yaml-bench" OR ${name} STREQUAL "lli-child-target")
|
|
||||||
+ set(export_to_llvmexports EXPORT LLVMTestExports)
|
|
||||||
+ else()
|
|
||||||
+ set(export_to_llvmexports EXPORT LLVMExports)
|
|
||||||
+ endif()
|
|
||||||
set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
diff -Naur a/llvm/cmake/modules/CMakeLists.txt b/llvm/cmake/modules/CMakeLists.txt
|
|
||||||
--- a/llvm/cmake/modules/CMakeLists.txt 2020-09-15 09:12:47.596424499 +0000
|
|
||||||
+++ b/llvm/cmake/modules/CMakeLists.txt 2020-09-15 09:14:33.110044977 +0000
|
|
||||||
@@ -80,6 +80,7 @@
|
|
||||||
set(LLVM_CONFIG_EXPORTS_FILE "${LLVM_EXPORTS_FILE}")
|
|
||||||
set(LLVM_CONFIG_EXPORTS "${LLVM_EXPORTS};${LLVM_EXPORTS_BUILDTREE_ONLY}")
|
|
||||||
set(LLVM_CONFIG_STATIC_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMStaticExports.cmake")
|
|
||||||
+set(LLVM_CONFIG_TEST_EXPORTS_FILE "\${LLVM_CMAKE_DIR}/LLVMTestExports.cmake")
|
|
||||||
set(llvm_config_include_buildtree_only_exports
|
|
||||||
"include(\"${LLVM_BUILDTREEONLY_EXPORTS_FILE}\")")
|
|
||||||
configure_file(
|
|
||||||
@@ -142,6 +143,8 @@
|
|
||||||
COMPONENT cmake-exports)
|
|
||||||
install(EXPORT LLVMStaticExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
|
||||||
COMPONENT cmake-exports)
|
|
||||||
+ install(EXPORT LLVMTestExports DESTINATION ${LLVM_INSTALL_PACKAGE_DIR}
|
|
||||||
+ COMPONENT cmake-exports)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
install(FILES
|
|
||||||
diff -Naur a/llvm/cmake/modules/LLVMConfig.cmake.in b/llvm/cmake/modules/LLVMConfig.cmake.in
|
|
||||||
--- a/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 09:12:47.597424505 +0000
|
|
||||||
+++ b/llvm/cmake/modules/LLVMConfig.cmake.in 2020-09-15 09:14:54.261169357 +0000
|
|
||||||
@@ -105,6 +105,7 @@
|
|
||||||
@llvm_config_include_buildtree_only_exports@
|
|
||||||
|
|
||||||
include("@LLVM_CONFIG_STATIC_EXPORTS_FILE@" OPTIONAL)
|
|
||||||
+ include("@LLVM_CONFIG_TEST_EXPORTS_FILE@" OPTIONAL)
|
|
||||||
endif()
|
|
||||||
|
|
||||||
# By creating intrinsics_gen, omp_gen and acc_gen here, subprojects that depend
|
|
@ -0,0 +1,29 @@
|
|||||||
|
From 60760d66030695105bcf4364f22b7f6053a25253 Mon Sep 17 00:00:00 2001
|
||||||
|
From: serge-sans-paille <sguelton@redhat.com>
|
||||||
|
Date: Thu, 8 Apr 2021 09:33:37 +0200
|
||||||
|
Subject: [PATCH] [PATCH][llvm] Make source-interleave-prefix test case
|
||||||
|
compatible with llvm-test
|
||||||
|
|
||||||
|
llvm-test runs test from a directory that's not the upstream one, and that leads
|
||||||
|
to some false positive. Workaround this by forcing the current working
|
||||||
|
directory.
|
||||||
|
---
|
||||||
|
llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test | 2 +-
|
||||||
|
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||||
|
|
||||||
|
diff --git a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test
|
||||||
|
index 23ce55a..d260ee2 100644
|
||||||
|
--- a/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test
|
||||||
|
+++ b/llvm/test/tools/llvm-objdump/X86/source-interleave-prefix.test
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
|
||||||
|
; RUN: sed -e "s,SRC_COMPDIR,./Inputs,g" %p/Inputs/source-interleave.ll > %t-relative-path.ll
|
||||||
|
; RUN: llc -o %t-relative-path.o -filetype=obj -mtriple=x86_64-pc-linux %t-relative-path.ll
|
||||||
|
-; RUN: llvm-objdump --prefix myprefix --source %t-relative-path.o 2>&1 | \
|
||||||
|
+; RUN: mkdir -p %t0 && cd %t0 && llvm-objdump --prefix myprefix --source %t-relative-path.o 2>&1 | \
|
||||||
|
; RUN: FileCheck %s --check-prefix=CHECK-BROKEN-PREFIX -DFILE=%t-relative-path.o -DPREFIX=.
|
||||||
|
; CHECK-BROKEN-PREFIX: warning: '[[FILE]]': failed to find source [[PREFIX]]/Inputs/source-interleave-x86_64.c
|
||||||
|
|
||||||
|
--
|
||||||
|
1.8.3.1
|
||||||
|
|
@ -1,427 +0,0 @@
|
|||||||
From 153232761304a2746ea9a11d9da3aa5e5a7c26d0 Mon Sep 17 00:00:00 2001
|
|
||||||
From: Hsiangkai Wang <kai.wang@sifive.com>
|
|
||||||
Date: Fri, 20 Nov 2020 08:52:03 +0800
|
|
||||||
Subject: [PATCH] [SelectionDAG] Avoid aliasing analysis if the object size is
|
|
||||||
unknown.
|
|
||||||
|
|
||||||
If the size of memory access is unknown, do not use it to analysis. One
|
|
||||||
example of unknown size memory access is to load/store scalable vector
|
|
||||||
objects on the stack.
|
|
||||||
|
|
||||||
Differential Revision: https://reviews.llvm.org/D91833
|
|
||||||
---
|
|
||||||
.../SelectionDAGAddressAnalysis.cpp | 31 +-
|
|
||||||
llvm/unittests/CodeGen/CMakeLists.txt | 1 +
|
|
||||||
.../SelectionDAGAddressAnalysisTest.cpp | 337 ++++++++++++++++++
|
|
||||||
3 files changed, 359 insertions(+), 10 deletions(-)
|
|
||||||
create mode 100644 llvm/unittests/CodeGen/SelectionDAGAddressAnalysisTest.cpp
|
|
||||||
|
|
||||||
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
|
|
||||||
index 3a53ab9717a4..20c7d771bfb6 100644
|
|
||||||
--- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
|
|
||||||
+++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGAddressAnalysis.cpp
|
|
||||||
@@ -7,6 +7,7 @@
|
|
||||||
//===----------------------------------------------------------------------===//
|
|
||||||
|
|
||||||
#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
|
|
||||||
+#include "llvm/Analysis/MemoryLocation.h"
|
|
||||||
#include "llvm/CodeGen/ISDOpcodes.h"
|
|
||||||
#include "llvm/CodeGen/MachineFrameInfo.h"
|
|
||||||
#include "llvm/CodeGen/MachineFunction.h"
|
|
||||||
@@ -96,18 +97,28 @@ bool BaseIndexOffset::computeAliasing(const SDNode *Op0,
|
|
||||||
int64_t PtrDiff;
|
|
||||||
if (NumBytes0.hasValue() && NumBytes1.hasValue() &&
|
|
||||||
BasePtr0.equalBaseIndex(BasePtr1, DAG, PtrDiff)) {
|
|
||||||
+ // If the size of memory access is unknown, do not use it to analysis.
|
|
||||||
+ // One example of unknown size memory access is to load/store scalable
|
|
||||||
+ // vector objects on the stack.
|
|
||||||
// BasePtr1 is PtrDiff away from BasePtr0. They alias if none of the
|
|
||||||
// following situations arise:
|
|
||||||
- IsAlias = !(
|
|
||||||
- // [----BasePtr0----]
|
|
||||||
- // [---BasePtr1--]
|
|
||||||
- // ========PtrDiff========>
|
|
||||||
- (*NumBytes0 <= PtrDiff) ||
|
|
||||||
- // [----BasePtr0----]
|
|
||||||
- // [---BasePtr1--]
|
|
||||||
- // =====(-PtrDiff)====>
|
|
||||||
- (PtrDiff + *NumBytes1 <= 0)); // i.e. *NumBytes1 < -PtrDiff.
|
|
||||||
- return true;
|
|
||||||
+ if (PtrDiff >= 0 &&
|
|
||||||
+ *NumBytes0 != static_cast<int64_t>(MemoryLocation::UnknownSize)) {
|
|
||||||
+ // [----BasePtr0----]
|
|
||||||
+ // [---BasePtr1--]
|
|
||||||
+ // ========PtrDiff========>
|
|
||||||
+ IsAlias = !(*NumBytes0 <= PtrDiff);
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+ if (PtrDiff < 0 &&
|
|
||||||
+ *NumBytes1 != static_cast<int64_t>(MemoryLocation::UnknownSize)) {
|
|
||||||
+ // [----BasePtr0----]
|
|
||||||
+ // [---BasePtr1--]
|
|
||||||
+ // =====(-PtrDiff)====>
|
|
||||||
+ IsAlias = !((PtrDiff + *NumBytes1) <= 0);
|
|
||||||
+ return true;
|
|
||||||
+ }
|
|
||||||
+ return false;
|
|
||||||
}
|
|
||||||
// If both BasePtr0 and BasePtr1 are FrameIndexes, we will not be
|
|
||||||
// able to calculate their relative offset if at least one arises
|
|
||||||
diff --git a/llvm/unittests/CodeGen/CMakeLists.txt b/llvm/unittests/CodeGen/CMakeLists.txt
|
|
||||||
index fa3cb1fa7669..2fe525f1b413 100644
|
|
||||||
--- a/llvm/unittests/CodeGen/CMakeLists.txt
|
|
||||||
+++ b/llvm/unittests/CodeGen/CMakeLists.txt
|
|
||||||
@@ -21,6 +21,7 @@ add_llvm_unittest(CodeGenTests
|
|
||||||
MachineInstrTest.cpp
|
|
||||||
MachineOperandTest.cpp
|
|
||||||
ScalableVectorMVTsTest.cpp
|
|
||||||
+ SelectionDAGAddressAnalysisTest.cpp
|
|
||||||
TypeTraitsTest.cpp
|
|
||||||
TargetOptionsTest.cpp
|
|
||||||
)
|
|
||||||
diff --git a/llvm/unittests/CodeGen/SelectionDAGAddressAnalysisTest.cpp b/llvm/unittests/CodeGen/SelectionDAGAddressAnalysisTest.cpp
|
|
||||||
new file mode 100644
|
|
||||||
index 000000000000..c00b6c518e70
|
|
||||||
--- /dev/null
|
|
||||||
+++ b/llvm/unittests/CodeGen/SelectionDAGAddressAnalysisTest.cpp
|
|
||||||
@@ -0,0 +1,337 @@
|
|
||||||
+//===- llvm/unittest/CodeGen/SelectionDAGAddressAnalysisTest.cpp ---------===//
|
|
||||||
+//
|
|
||||||
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
||||||
+// See https://llvm.org/LICENSE.txt for license information.
|
|
||||||
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
|
||||||
+//
|
|
||||||
+//===----------------------------------------------------------------------===//
|
|
||||||
+
|
|
||||||
+#include "llvm/CodeGen/SelectionDAGAddressAnalysis.h"
|
|
||||||
+#include "llvm/Analysis/MemoryLocation.h"
|
|
||||||
+#include "llvm/Analysis/OptimizationRemarkEmitter.h"
|
|
||||||
+#include "llvm/AsmParser/Parser.h"
|
|
||||||
+#include "llvm/CodeGen/MachineModuleInfo.h"
|
|
||||||
+#include "llvm/CodeGen/SelectionDAG.h"
|
|
||||||
+#include "llvm/CodeGen/TargetLowering.h"
|
|
||||||
+#include "llvm/Support/SourceMgr.h"
|
|
||||||
+#include "llvm/Support/TargetRegistry.h"
|
|
||||||
+#include "llvm/Support/TargetSelect.h"
|
|
||||||
+#include "llvm/Target/TargetMachine.h"
|
|
||||||
+#include "gtest/gtest.h"
|
|
||||||
+
|
|
||||||
+namespace llvm {
|
|
||||||
+
|
|
||||||
+class SelectionDAGAddressAnalysisTest : public testing::Test {
|
|
||||||
+protected:
|
|
||||||
+ static void SetUpTestCase() {
|
|
||||||
+ InitializeAllTargets();
|
|
||||||
+ InitializeAllTargetMCs();
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ void SetUp() override {
|
|
||||||
+ StringRef Assembly = "@g = global i32 0\n"
|
|
||||||
+ "define i32 @f() {\n"
|
|
||||||
+ " %1 = load i32, i32* @g\n"
|
|
||||||
+ " ret i32 %1\n"
|
|
||||||
+ "}";
|
|
||||||
+
|
|
||||||
+ Triple TargetTriple("aarch64--");
|
|
||||||
+ std::string Error;
|
|
||||||
+ const Target *T = TargetRegistry::lookupTarget("", TargetTriple, Error);
|
|
||||||
+ // FIXME: These tests do not depend on AArch64 specifically, but we have to
|
|
||||||
+ // initialize a target. A skeleton Target for unittests would allow us to
|
|
||||||
+ // always run these tests.
|
|
||||||
+ if (!T)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ TargetOptions Options;
|
|
||||||
+ TM = std::unique_ptr<LLVMTargetMachine>(static_cast<LLVMTargetMachine *>(
|
|
||||||
+ T->createTargetMachine("AArch64", "", "+sve", Options, None, None,
|
|
||||||
+ CodeGenOpt::Aggressive)));
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+
|
|
||||||
+ SMDiagnostic SMError;
|
|
||||||
+ M = parseAssemblyString(Assembly, SMError, Context);
|
|
||||||
+ if (!M)
|
|
||||||
+ report_fatal_error(SMError.getMessage());
|
|
||||||
+ M->setDataLayout(TM->createDataLayout());
|
|
||||||
+
|
|
||||||
+ F = M->getFunction("f");
|
|
||||||
+ if (!F)
|
|
||||||
+ report_fatal_error("F?");
|
|
||||||
+ G = M->getGlobalVariable("g");
|
|
||||||
+ if (!G)
|
|
||||||
+ report_fatal_error("G?");
|
|
||||||
+
|
|
||||||
+ MachineModuleInfo MMI(TM.get());
|
|
||||||
+
|
|
||||||
+ MF = std::make_unique<MachineFunction>(*F, *TM, *TM->getSubtargetImpl(*F),
|
|
||||||
+ 0, MMI);
|
|
||||||
+
|
|
||||||
+ DAG = std::make_unique<SelectionDAG>(*TM, CodeGenOpt::None);
|
|
||||||
+ if (!DAG)
|
|
||||||
+ report_fatal_error("DAG?");
|
|
||||||
+ OptimizationRemarkEmitter ORE(F);
|
|
||||||
+ DAG->init(*MF, ORE, nullptr, nullptr, nullptr, nullptr, nullptr);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ TargetLoweringBase::LegalizeTypeAction getTypeAction(EVT VT) {
|
|
||||||
+ return DAG->getTargetLoweringInfo().getTypeAction(Context, VT);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ EVT getTypeToTransformTo(EVT VT) {
|
|
||||||
+ return DAG->getTargetLoweringInfo().getTypeToTransformTo(Context, VT);
|
|
||||||
+ }
|
|
||||||
+
|
|
||||||
+ LLVMContext Context;
|
|
||||||
+ std::unique_ptr<LLVMTargetMachine> TM;
|
|
||||||
+ std::unique_ptr<Module> M;
|
|
||||||
+ Function *F;
|
|
||||||
+ GlobalVariable *G;
|
|
||||||
+ std::unique_ptr<MachineFunction> MF;
|
|
||||||
+ std::unique_ptr<SelectionDAG> DAG;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, sameFrameObject) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 4);
|
|
||||||
+ SDValue FIPtr = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo = MachinePointerInfo::getFixedStack(*MF, FI);
|
|
||||||
+ TypeSize Offset = TypeSize::Fixed(0);
|
|
||||||
+ SDValue Value = DAG->getConstant(0, Loc, VecVT);
|
|
||||||
+ SDValue Index = DAG->getMemBasePlusOffset(FIPtr, Offset, Loc);
|
|
||||||
+ SDValue Store = DAG->getStore(DAG->getEntryNode(), Loc, Value, Index,
|
|
||||||
+ PtrInfo.getWithOffset(Offset));
|
|
||||||
+ Optional<int64_t> NumBytes = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store.getNode(), NumBytes, Store.getNode(), NumBytes, *DAG, IsAlias);
|
|
||||||
+
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_TRUE(IsAlias);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, noAliasingFrameObjects) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ // <4 x i8>
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 4);
|
|
||||||
+ // <2 x i8>
|
|
||||||
+ auto SubVecVT = EVT::getVectorVT(Context, Int8VT, 2);
|
|
||||||
+ SDValue FIPtr = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo = MachinePointerInfo::getFixedStack(*MF, FI);
|
|
||||||
+ SDValue Value = DAG->getConstant(0, Loc, SubVecVT);
|
|
||||||
+ TypeSize Offset0 = TypeSize::Fixed(0);
|
|
||||||
+ TypeSize Offset1 = SubVecVT.getStoreSize();
|
|
||||||
+ SDValue Index0 = DAG->getMemBasePlusOffset(FIPtr, Offset0, Loc);
|
|
||||||
+ SDValue Index1 = DAG->getMemBasePlusOffset(FIPtr, Offset1, Loc);
|
|
||||||
+ SDValue Store0 = DAG->getStore(DAG->getEntryNode(), Loc, Value, Index0,
|
|
||||||
+ PtrInfo.getWithOffset(Offset0));
|
|
||||||
+ SDValue Store1 = DAG->getStore(DAG->getEntryNode(), Loc, Value, Index1,
|
|
||||||
+ PtrInfo.getWithOffset(Offset1));
|
|
||||||
+ Optional<int64_t> NumBytes0 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store0)->getMemoryVT().getStoreSize());
|
|
||||||
+ Optional<int64_t> NumBytes1 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store1)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store0.getNode(), NumBytes0, Store1.getNode(), NumBytes1, *DAG, IsAlias);
|
|
||||||
+
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_FALSE(IsAlias);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, unknownSizeFrameObjects) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ // <vscale x 4 x i8>
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 4, true);
|
|
||||||
+ // <vscale x 2 x i8>
|
|
||||||
+ auto SubVecVT = EVT::getVectorVT(Context, Int8VT, 2, true);
|
|
||||||
+ SDValue FIPtr = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo = MachinePointerInfo::getFixedStack(*MF, FI);
|
|
||||||
+ SDValue Value = DAG->getConstant(0, Loc, SubVecVT);
|
|
||||||
+ TypeSize Offset0 = TypeSize::Fixed(0);
|
|
||||||
+ TypeSize Offset1 = SubVecVT.getStoreSize();
|
|
||||||
+ SDValue Index0 = DAG->getMemBasePlusOffset(FIPtr, Offset0, Loc);
|
|
||||||
+ SDValue Index1 = DAG->getMemBasePlusOffset(FIPtr, Offset1, Loc);
|
|
||||||
+ SDValue Store0 = DAG->getStore(DAG->getEntryNode(), Loc, Value, Index0,
|
|
||||||
+ PtrInfo.getWithOffset(Offset0));
|
|
||||||
+ SDValue Store1 = DAG->getStore(DAG->getEntryNode(), Loc, Value, Index1,
|
|
||||||
+ PtrInfo.getWithOffset(Offset1));
|
|
||||||
+ Optional<int64_t> NumBytes0 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store0)->getMemoryVT().getStoreSize());
|
|
||||||
+ Optional<int64_t> NumBytes1 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store1)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store0.getNode(), NumBytes0, Store1.getNode(), NumBytes1, *DAG, IsAlias);
|
|
||||||
+
|
|
||||||
+ EXPECT_FALSE(IsValid);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, globalWithFrameObject) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ // <vscale x 4 x i8>
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 4, true);
|
|
||||||
+ SDValue FIPtr = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo = MachinePointerInfo::getFixedStack(*MF, FI);
|
|
||||||
+ SDValue Value = DAG->getConstant(0, Loc, VecVT);
|
|
||||||
+ TypeSize Offset = TypeSize::Fixed(0);
|
|
||||||
+ SDValue Index = DAG->getMemBasePlusOffset(FIPtr, Offset, Loc);
|
|
||||||
+ SDValue Store = DAG->getStore(DAG->getEntryNode(), Loc, Value, Index,
|
|
||||||
+ PtrInfo.getWithOffset(Offset));
|
|
||||||
+ Optional<int64_t> NumBytes = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store)->getMemoryVT().getStoreSize());
|
|
||||||
+ EVT GTy = DAG->getTargetLoweringInfo().getValueType(DAG->getDataLayout(),
|
|
||||||
+ G->getType());
|
|
||||||
+ SDValue GValue = DAG->getConstant(0, Loc, GTy);
|
|
||||||
+ SDValue GAddr = DAG->getGlobalAddress(G, Loc, GTy);
|
|
||||||
+ SDValue GStore = DAG->getStore(DAG->getEntryNode(), Loc, GValue, GAddr,
|
|
||||||
+ MachinePointerInfo(G, 0));
|
|
||||||
+ Optional<int64_t> GNumBytes = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(GStore)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store.getNode(), NumBytes, GStore.getNode(), GNumBytes, *DAG, IsAlias);
|
|
||||||
+
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_FALSE(IsAlias);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, fixedSizeFrameObjectsWithinDiff) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ // <vscale x 4 x i8>
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 4, true);
|
|
||||||
+ // <vscale x 2 x i8>
|
|
||||||
+ auto SubVecVT = EVT::getVectorVT(Context, Int8VT, 2, true);
|
|
||||||
+ // <2 x i8>
|
|
||||||
+ auto SubFixedVecVT2xi8 = EVT::getVectorVT(Context, Int8VT, 2);
|
|
||||||
+ SDValue FIPtr = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo = MachinePointerInfo::getFixedStack(*MF, FI);
|
|
||||||
+ SDValue Value0 = DAG->getConstant(0, Loc, SubFixedVecVT2xi8);
|
|
||||||
+ SDValue Value1 = DAG->getConstant(0, Loc, SubVecVT);
|
|
||||||
+ TypeSize Offset0 = TypeSize::Fixed(0);
|
|
||||||
+ TypeSize Offset1 = SubFixedVecVT2xi8.getStoreSize();
|
|
||||||
+ SDValue Index0 = DAG->getMemBasePlusOffset(FIPtr, Offset0, Loc);
|
|
||||||
+ SDValue Index1 = DAG->getMemBasePlusOffset(FIPtr, Offset1, Loc);
|
|
||||||
+ SDValue Store0 = DAG->getStore(DAG->getEntryNode(), Loc, Value0, Index0,
|
|
||||||
+ PtrInfo.getWithOffset(Offset0));
|
|
||||||
+ SDValue Store1 = DAG->getStore(DAG->getEntryNode(), Loc, Value1, Index1,
|
|
||||||
+ PtrInfo.getWithOffset(Offset1));
|
|
||||||
+ Optional<int64_t> NumBytes0 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store0)->getMemoryVT().getStoreSize());
|
|
||||||
+ Optional<int64_t> NumBytes1 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store1)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store0.getNode(), NumBytes0, Store1.getNode(), NumBytes1, *DAG, IsAlias);
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_FALSE(IsAlias);
|
|
||||||
+
|
|
||||||
+ IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store1.getNode(), NumBytes1, Store0.getNode(), NumBytes0, *DAG, IsAlias);
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_FALSE(IsAlias);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, fixedSizeFrameObjectsOutOfDiff) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ // <vscale x 4 x i8>
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 4, true);
|
|
||||||
+ // <vscale x 2 x i8>
|
|
||||||
+ auto SubVecVT = EVT::getVectorVT(Context, Int8VT, 2, true);
|
|
||||||
+ // <2 x i8>
|
|
||||||
+ auto SubFixedVecVT2xi8 = EVT::getVectorVT(Context, Int8VT, 2);
|
|
||||||
+ // <4 x i8>
|
|
||||||
+ auto SubFixedVecVT4xi8 = EVT::getVectorVT(Context, Int8VT, 4);
|
|
||||||
+ SDValue FIPtr = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI = cast<FrameIndexSDNode>(FIPtr.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo = MachinePointerInfo::getFixedStack(*MF, FI);
|
|
||||||
+ SDValue Value0 = DAG->getConstant(0, Loc, SubFixedVecVT4xi8);
|
|
||||||
+ SDValue Value1 = DAG->getConstant(0, Loc, SubVecVT);
|
|
||||||
+ TypeSize Offset0 = TypeSize::Fixed(0);
|
|
||||||
+ TypeSize Offset1 = SubFixedVecVT2xi8.getStoreSize();
|
|
||||||
+ SDValue Index0 = DAG->getMemBasePlusOffset(FIPtr, Offset0, Loc);
|
|
||||||
+ SDValue Index1 = DAG->getMemBasePlusOffset(FIPtr, Offset1, Loc);
|
|
||||||
+ SDValue Store0 = DAG->getStore(DAG->getEntryNode(), Loc, Value0, Index0,
|
|
||||||
+ PtrInfo.getWithOffset(Offset0));
|
|
||||||
+ SDValue Store1 = DAG->getStore(DAG->getEntryNode(), Loc, Value1, Index1,
|
|
||||||
+ PtrInfo.getWithOffset(Offset1));
|
|
||||||
+ Optional<int64_t> NumBytes0 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store0)->getMemoryVT().getStoreSize());
|
|
||||||
+ Optional<int64_t> NumBytes1 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store1)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store0.getNode(), NumBytes0, Store1.getNode(), NumBytes1, *DAG, IsAlias);
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_TRUE(IsAlias);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+TEST_F(SelectionDAGAddressAnalysisTest, twoFixedStackObjects) {
|
|
||||||
+ if (!TM)
|
|
||||||
+ return;
|
|
||||||
+ SDLoc Loc;
|
|
||||||
+ auto Int8VT = EVT::getIntegerVT(Context, 8);
|
|
||||||
+ // <vscale x 2 x i8>
|
|
||||||
+ auto VecVT = EVT::getVectorVT(Context, Int8VT, 2, true);
|
|
||||||
+ // <2 x i8>
|
|
||||||
+ auto FixedVecVT = EVT::getVectorVT(Context, Int8VT, 2);
|
|
||||||
+ SDValue FIPtr0 = DAG->CreateStackTemporary(FixedVecVT);
|
|
||||||
+ SDValue FIPtr1 = DAG->CreateStackTemporary(VecVT);
|
|
||||||
+ int FI0 = cast<FrameIndexSDNode>(FIPtr0.getNode())->getIndex();
|
|
||||||
+ int FI1 = cast<FrameIndexSDNode>(FIPtr1.getNode())->getIndex();
|
|
||||||
+ MachinePointerInfo PtrInfo0 = MachinePointerInfo::getFixedStack(*MF, FI0);
|
|
||||||
+ MachinePointerInfo PtrInfo1 = MachinePointerInfo::getFixedStack(*MF, FI1);
|
|
||||||
+ SDValue Value0 = DAG->getConstant(0, Loc, FixedVecVT);
|
|
||||||
+ SDValue Value1 = DAG->getConstant(0, Loc, VecVT);
|
|
||||||
+ TypeSize Offset0 = TypeSize::Fixed(0);
|
|
||||||
+ SDValue Index0 = DAG->getMemBasePlusOffset(FIPtr0, Offset0, Loc);
|
|
||||||
+ SDValue Index1 = DAG->getMemBasePlusOffset(FIPtr1, Offset0, Loc);
|
|
||||||
+ SDValue Store0 = DAG->getStore(DAG->getEntryNode(), Loc, Value0, Index0,
|
|
||||||
+ PtrInfo0.getWithOffset(Offset0));
|
|
||||||
+ SDValue Store1 = DAG->getStore(DAG->getEntryNode(), Loc, Value1, Index1,
|
|
||||||
+ PtrInfo1.getWithOffset(Offset0));
|
|
||||||
+ Optional<int64_t> NumBytes0 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store0)->getMemoryVT().getStoreSize());
|
|
||||||
+ Optional<int64_t> NumBytes1 = MemoryLocation::getSizeOrUnknown(
|
|
||||||
+ cast<StoreSDNode>(Store1)->getMemoryVT().getStoreSize());
|
|
||||||
+
|
|
||||||
+ bool IsAlias;
|
|
||||||
+ bool IsValid = BaseIndexOffset::computeAliasing(
|
|
||||||
+ Store0.getNode(), NumBytes0, Store1.getNode(), NumBytes1, *DAG, IsAlias);
|
|
||||||
+ EXPECT_TRUE(IsValid);
|
|
||||||
+ EXPECT_FALSE(IsAlias);
|
|
||||||
+}
|
|
||||||
+
|
|
||||||
+} // end namespace llvm
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -1,166 +0,0 @@
|
|||||||
From d851495f2fe614c4c860bda1bd3c80bfbe48360b Mon Sep 17 00:00:00 2001
|
|
||||||
From: Jonas Paulsson <paulsson@linux.vnet.ibm.com>
|
|
||||||
Date: Thu, 8 Oct 2020 13:18:29 +0200
|
|
||||||
Subject: [PATCH] [SystemZ] Use LA instead of AGR in eliminateFrameIndex().
|
|
||||||
|
|
||||||
Since AGR clobbers CC it should not be used here.
|
|
||||||
|
|
||||||
Fixes https://bugs.llvm.org/show_bug.cgi?id=47736.
|
|
||||||
|
|
||||||
Review: Ulrich Weigand
|
|
||||||
Differential Revision: https://reviews.llvm.org/D89034
|
|
||||||
---
|
|
||||||
.../Target/SystemZ/SystemZRegisterInfo.cpp | 4 +--
|
|
||||||
llvm/test/CodeGen/SystemZ/frame-14.ll | 26 +++++++++----------
|
|
||||||
llvm/test/CodeGen/SystemZ/frame-16.ll | 4 +--
|
|
||||||
3 files changed, 17 insertions(+), 17 deletions(-)
|
|
||||||
|
|
||||||
diff --git a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
|
|
||||||
index 53b06c6e7e6d..88212e52460f 100644
|
|
||||||
--- a/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
|
|
||||||
+++ b/llvm/lib/Target/SystemZ/SystemZRegisterInfo.cpp
|
|
||||||
@@ -322,8 +322,8 @@ SystemZRegisterInfo::eliminateFrameIndex(MachineBasicBlock::iterator MI,
|
|
||||||
// Load the high offset into the scratch register and use it as
|
|
||||||
// an index.
|
|
||||||
TII->loadImmediate(MBB, MI, ScratchReg, HighOffset);
|
|
||||||
- BuildMI(MBB, MI, DL, TII->get(SystemZ::AGR),ScratchReg)
|
|
||||||
- .addReg(ScratchReg, RegState::Kill).addReg(BasePtr);
|
|
||||||
+ BuildMI(MBB, MI, DL, TII->get(SystemZ::LA), ScratchReg)
|
|
||||||
+ .addReg(BasePtr, RegState::Kill).addImm(0).addReg(ScratchReg);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Use the scratch register as the base. It then dies here.
|
|
||||||
diff --git a/llvm/test/CodeGen/SystemZ/frame-14.ll b/llvm/test/CodeGen/SystemZ/frame-14.ll
|
|
||||||
index e70731249b42..193ff81123c5 100644
|
|
||||||
--- a/llvm/test/CodeGen/SystemZ/frame-14.ll
|
|
||||||
+++ b/llvm/test/CodeGen/SystemZ/frame-14.ll
|
|
||||||
@@ -85,13 +85,13 @@ define void @f3() {
|
|
||||||
define void @f4() {
|
|
||||||
; CHECK-NOFP-LABEL: f4:
|
|
||||||
; CHECK-NOFP: llilh %r1, 8
|
|
||||||
-; CHECK-NOFP: agr %r1, %r15
|
|
||||||
+; CHECK-NOFP: la %r1, 0(%r1,%r15)
|
|
||||||
; CHECK-NOFP: mvi 0(%r1), 42
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
;
|
|
||||||
; CHECK-FP-LABEL: f4:
|
|
||||||
; CHECK-FP: llilh %r1, 8
|
|
||||||
-; CHECK-FP: agr %r1, %r11
|
|
||||||
+; CHECK-FP: la %r1, 0(%r1,%r11)
|
|
||||||
; CHECK-FP: mvi 0(%r1), 42
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
%region1 = alloca [524104 x i8], align 8
|
|
||||||
@@ -108,13 +108,13 @@ define void @f4() {
|
|
||||||
define void @f5() {
|
|
||||||
; CHECK-NOFP-LABEL: f5:
|
|
||||||
; CHECK-NOFP: llilh %r1, 8
|
|
||||||
-; CHECK-NOFP: agr %r1, %r15
|
|
||||||
+; CHECK-NOFP: la %r1, 0(%r1,%r15)
|
|
||||||
; CHECK-NOFP: mvi 4095(%r1), 42
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
;
|
|
||||||
; CHECK-FP-LABEL: f5:
|
|
||||||
; CHECK-FP: llilh %r1, 8
|
|
||||||
-; CHECK-FP: agr %r1, %r11
|
|
||||||
+; CHECK-FP: la %r1, 0(%r1,%r11)
|
|
||||||
; CHECK-FP: mvi 4095(%r1), 42
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
%region1 = alloca [524104 x i8], align 8
|
|
||||||
@@ -130,13 +130,13 @@ define void @f5() {
|
|
||||||
define void @f6() {
|
|
||||||
; CHECK-NOFP-LABEL: f6:
|
|
||||||
; CHECK-NOFP: llilh %r1, 8
|
|
||||||
-; CHECK-NOFP: agr %r1, %r15
|
|
||||||
+; CHECK-NOFP: la %r1, 0(%r1,%r15)
|
|
||||||
; CHECK-NOFP: mviy 4096(%r1), 42
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
;
|
|
||||||
; CHECK-FP-LABEL: f6:
|
|
||||||
; CHECK-FP: llilh %r1, 8
|
|
||||||
-; CHECK-FP: agr %r1, %r11
|
|
||||||
+; CHECK-FP: la %r1, 0(%r1,%r11)
|
|
||||||
; CHECK-FP: mviy 4096(%r1), 42
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
%region1 = alloca [524104 x i8], align 8
|
|
||||||
@@ -155,13 +155,13 @@ define void @f6() {
|
|
||||||
define void @f7() {
|
|
||||||
; CHECK-NOFP-LABEL: f7:
|
|
||||||
; CHECK-NOFP: llilh %r1, 23
|
|
||||||
-; CHECK-NOFP: agr %r1, %r15
|
|
||||||
+; CHECK-NOFP: la %r1, 0(%r1,%r15)
|
|
||||||
; CHECK-NOFP: mviy 65535(%r1), 42
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
;
|
|
||||||
; CHECK-FP-LABEL: f7:
|
|
||||||
; CHECK-FP: llilh %r1, 23
|
|
||||||
-; CHECK-FP: agr %r1, %r11
|
|
||||||
+; CHECK-FP: la %r1, 0(%r1,%r11)
|
|
||||||
; CHECK-FP: mviy 65535(%r1), 42
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
%region1 = alloca [1048400 x i8], align 8
|
|
||||||
@@ -178,13 +178,13 @@ define void @f7() {
|
|
||||||
define void @f8() {
|
|
||||||
; CHECK-NOFP-LABEL: f8:
|
|
||||||
; CHECK-NOFP: llilh %r1, 24
|
|
||||||
-; CHECK-NOFP: agr %r1, %r15
|
|
||||||
+; CHECK-NOFP: la %r1, 0(%r1,%r15)
|
|
||||||
; CHECK-NOFP: mvi 7(%r1), 42
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
;
|
|
||||||
; CHECK-FP-LABEL: f8:
|
|
||||||
; CHECK-FP: llilh %r1, 24
|
|
||||||
-; CHECK-FP: agr %r1, %r11
|
|
||||||
+; CHECK-FP: la %r1, 0(%r1,%r11)
|
|
||||||
; CHECK-FP: mvi 7(%r1), 42
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
%region1 = alloca [1048408 x i8], align 8
|
|
||||||
@@ -233,7 +233,7 @@ define void @f10(i32 *%vptr) {
|
|
||||||
; CHECK-NOFP-LABEL: f10:
|
|
||||||
; CHECK-NOFP: stg [[REGISTER:%r[1-9][0-4]?]], [[OFFSET:160|168]](%r15)
|
|
||||||
; CHECK-NOFP: llilh [[REGISTER]], 8
|
|
||||||
-; CHECK-NOFP: agr [[REGISTER]], %r15
|
|
||||||
+; CHECK-NOFP: la [[REGISTER]], 0([[REGISTER]],%r15)
|
|
||||||
; CHECK-NOFP: mvi 0([[REGISTER]]), 42
|
|
||||||
; CHECK-NOFP: lg [[REGISTER]], [[OFFSET]](%r15)
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
@@ -241,7 +241,7 @@ define void @f10(i32 *%vptr) {
|
|
||||||
; CHECK-FP-LABEL: f10:
|
|
||||||
; CHECK-FP: stg [[REGISTER:%r[1-9][0-4]?]], [[OFFSET:160|168]](%r11)
|
|
||||||
; CHECK-FP: llilh [[REGISTER]], 8
|
|
||||||
-; CHECK-FP: agr [[REGISTER]], %r11
|
|
||||||
+; CHECK-FP: la [[REGISTER]], 0([[REGISTER]],%r11)
|
|
||||||
; CHECK-FP: mvi 0([[REGISTER]]), 42
|
|
||||||
; CHECK-FP: lg [[REGISTER]], [[OFFSET]](%r11)
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
@@ -273,7 +273,7 @@ define void @f11(i32 *%vptr) {
|
|
||||||
; CHECK-NOFP: stmg %r6, %r15,
|
|
||||||
; CHECK-NOFP: stg [[REGISTER:%r[1-9][0-4]?]], [[OFFSET:160|168]](%r15)
|
|
||||||
; CHECK-NOFP: llilh [[REGISTER]], 8
|
|
||||||
-; CHECK-NOFP: agr [[REGISTER]], %r15
|
|
||||||
+; CHECK-NOFP: la [[REGISTER]], 0([[REGISTER]],%r15)
|
|
||||||
; CHECK-NOFP: mvi 0([[REGISTER]]), 42
|
|
||||||
; CHECK-NOFP: lg [[REGISTER]], [[OFFSET]](%r15)
|
|
||||||
; CHECK-NOFP: lmg %r6, %r15,
|
|
||||||
diff --git a/llvm/test/CodeGen/SystemZ/frame-16.ll b/llvm/test/CodeGen/SystemZ/frame-16.ll
|
|
||||||
index ae8a041ae110..a95c58207afb 100644
|
|
||||||
--- a/llvm/test/CodeGen/SystemZ/frame-16.ll
|
|
||||||
+++ b/llvm/test/CodeGen/SystemZ/frame-16.ll
|
|
||||||
@@ -311,13 +311,13 @@ define void @f11(i32 *%vptr, i8 %byte) {
|
|
||||||
define void @f12(i8 %byte, i64 %index) {
|
|
||||||
; CHECK-NOFP-LABEL: f12:
|
|
||||||
; CHECK-NOFP: llilh %r1, 8
|
|
||||||
-; CHECK-NOFP: agr %r1, %r15
|
|
||||||
+; CHECK-NOFP: la %r1, 0(%r1,%r15)
|
|
||||||
; CHECK-NOFP: stc %r2, 0(%r3,%r1)
|
|
||||||
; CHECK-NOFP: br %r14
|
|
||||||
;
|
|
||||||
; CHECK-FP-LABEL: f12:
|
|
||||||
; CHECK-FP: llilh %r1, 8
|
|
||||||
-; CHECK-FP: agr %r1, %r11
|
|
||||||
+; CHECK-FP: la %r1, 0(%r1,%r11)
|
|
||||||
; CHECK-FP: stc %r2, 0(%r3,%r1)
|
|
||||||
; CHECK-FP: br %r14
|
|
||||||
%region1 = alloca [524104 x i8], align 8
|
|
||||||
--
|
|
||||||
2.26.2
|
|
||||||
|
|
@ -9,4 +9,4 @@ diff -Naur a/llvm/test/tools/llvm-ar/error-opening-permission.test b/llvm/test/t
|
|||||||
+# RUN: echo > %t/permission.b || not llvm-ar p %t/permission.b 2>&1 | \
|
+# RUN: echo > %t/permission.b || not llvm-ar p %t/permission.b 2>&1 | \
|
||||||
# RUN: FileCheck %s --check-prefix=NO-PERMISSION -DARCHIVE=%t/permission.b
|
# RUN: FileCheck %s --check-prefix=NO-PERMISSION -DARCHIVE=%t/permission.b
|
||||||
|
|
||||||
# NO-PERMISSION: error: unable to open '[[ARCHIVE]]': {{[pP]}}ermission denied
|
# NO-PERMISSION: error: unable to open '[[ARCHIVE]]': {{.*}}{{[pP]}}ermission denied
|
||||||
|
Binary file not shown.
BIN
SOURCES/llvm-12.0.1.src.tar.xz.sig
Normal file
BIN
SOURCES/llvm-12.0.1.src.tar.xz.sig
Normal file
Binary file not shown.
169
SPECS/llvm.spec
169
SPECS/llvm.spec
@ -8,20 +8,17 @@
|
|||||||
|
|
||||||
%bcond_with compat_build
|
%bcond_with compat_build
|
||||||
|
|
||||||
%global _smp_mflags -j8
|
|
||||||
|
|
||||||
%global llvm_libdir %{_libdir}/%{name}
|
%global llvm_libdir %{_libdir}/%{name}
|
||||||
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
|
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
|
||||||
#%%global rc_ver 6
|
#%%global rc_ver 5
|
||||||
%global baserelease 2
|
|
||||||
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||||
%global maj_ver 11
|
%global maj_ver 12
|
||||||
%global min_ver 0
|
%global min_ver 0
|
||||||
%global patch_ver 1
|
%global patch_ver 1
|
||||||
|
|
||||||
%if %{with compat_build}
|
%if %{with compat_build}
|
||||||
%global pkg_name llvm%{maj_ver}.%{min_ver}
|
%global pkg_name llvm%{maj_ver}
|
||||||
%global exec_suffix -%{maj_ver}.%{min_ver}
|
%global exec_suffix -%{maj_ver}
|
||||||
%global install_prefix %{_libdir}/%{name}
|
%global install_prefix %{_libdir}/%{name}
|
||||||
%global install_bindir %{install_prefix}/bin
|
%global install_bindir %{install_prefix}/bin
|
||||||
%global install_includedir %{install_prefix}/include
|
%global install_includedir %{install_prefix}/include
|
||||||
@ -34,10 +31,20 @@
|
|||||||
%global pkg_name llvm
|
%global pkg_name llvm
|
||||||
%global install_prefix /usr
|
%global install_prefix /usr
|
||||||
%global install_libdir %{_libdir}
|
%global install_libdir %{_libdir}
|
||||||
|
%global pkg_bindir %{_bindir}
|
||||||
%global pkg_libdir %{install_libdir}
|
%global pkg_libdir %{install_libdir}
|
||||||
|
%global exec_suffix %{nil}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%if 0%{?rhel}
|
||||||
|
%global targets_to_build "X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF;WebAssembly"
|
||||||
|
%global experimental_targets_to_build ""
|
||||||
|
%global _smp_mflags -j8
|
||||||
|
%else
|
||||||
|
%global targets_to_build "all"
|
||||||
|
%global experimental_targets_to_build "AVR"
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
%global build_install_prefix %{buildroot}%{install_prefix}
|
|
||||||
|
|
||||||
%if !0%{?rhel}
|
%if !0%{?rhel}
|
||||||
# libedit-devel is a buildroot-only package in RHEL8, so we can't have a
|
# libedit-devel is a buildroot-only package in RHEL8, so we can't have a
|
||||||
@ -45,25 +52,24 @@
|
|||||||
%global use_libedit 1
|
%global use_libedit 1
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
%global build_install_prefix %{buildroot}%{install_prefix}
|
||||||
|
|
||||||
Name: %{pkg_name}
|
Name: %{pkg_name}
|
||||||
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
|
Version: %{maj_ver}.%{min_ver}.%{patch_ver}%{?rc_ver:~rc%{rc_ver}}
|
||||||
Release: %{baserelease}%{?rc_ver:.rc%{rc_ver}}%{?dist}
|
Release: 2%{?dist}
|
||||||
Summary: The Low Level Virtual Machine
|
Summary: The Low Level Virtual Machine
|
||||||
|
|
||||||
License: NCSA
|
License: NCSA
|
||||||
URL: http://llvm.org
|
URL: http://llvm.org
|
||||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz
|
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz
|
||||||
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig
|
Source1: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}%{?rc_ver:-rc%{rc_ver}}/%{llvm_srcdir}.tar.xz.sig
|
||||||
|
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
Source3: run-lit-tests
|
Source3: run-lit-tests
|
||||||
Source4: lit.fedora.cfg.py
|
Source4: lit.fedora.cfg.py
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
# Fix coreos-installer test crash on s390x (rhbz#1883457), https://reviews.llvm.org/D89034
|
Patch0: 0001-PATCH-llvm-Make-source-interleave-prefix-test-case-c.patch
|
||||||
Patch1: 0001-SystemZ-Use-LA-instead-of-AGR-in-eliminateFrameIndex.patch
|
|
||||||
Patch2: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
|
|
||||||
Patch3: 0001-CMake-Split-test-binary-exports-into-their-own-expor.patch
|
|
||||||
Patch4: 0001-SelectionDAG-Avoid-aliasing-analysis-if-the-object-s.patch
|
|
||||||
|
|
||||||
# RHEL-specific patches.
|
# RHEL-specific patches.
|
||||||
Patch101: 0001-Deactivate-markdown-doc.patch
|
Patch101: 0001-Deactivate-markdown-doc.patch
|
||||||
@ -98,6 +104,7 @@ BuildRequires: libedit-devel
|
|||||||
%endif
|
%endif
|
||||||
# We need python3-devel for pathfix.py.
|
# We need python3-devel for pathfix.py.
|
||||||
BuildRequires: python3-devel
|
BuildRequires: python3-devel
|
||||||
|
BuildRequires: python3-setuptools
|
||||||
|
|
||||||
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
Requires: %{name}-libs%{?_isa} = %{version}-%{release}
|
||||||
|
|
||||||
@ -124,8 +131,10 @@ Requires: libedit-devel
|
|||||||
# separate files, so that llvm-devel would not need to Require these packages,
|
# separate files, so that llvm-devel would not need to Require these packages,
|
||||||
# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream
|
# but this caused bugs (rhbz#1773678) and forced us to carry two non-upstream
|
||||||
# patches.
|
# patches.
|
||||||
Requires: llvm-static%{?_isa} = %{version}-%{release}
|
Requires: %{name}-static%{?_isa} = %{version}-%{release}
|
||||||
Requires: llvm-test%{?_isa} = %{version}-%{release}
|
%if %{without compat_build}
|
||||||
|
Requires: %{name}-test%{?_isa} = %{version}-%{release}
|
||||||
|
%endif
|
||||||
|
|
||||||
|
|
||||||
Requires(post): %{_sbindir}/alternatives
|
Requires(post): %{_sbindir}/alternatives
|
||||||
@ -155,6 +164,8 @@ Shared libraries for the LLVM compiler infrastructure.
|
|||||||
Summary: LLVM static libraries
|
Summary: LLVM static libraries
|
||||||
Conflicts: %{name}-devel < 8
|
Conflicts: %{name}-devel < 8
|
||||||
|
|
||||||
|
Provides: llvm-static(major) = %{maj_ver}
|
||||||
|
|
||||||
%description static
|
%description static
|
||||||
Static libraries for the LLVM compiler infrastructure.
|
Static libraries for the LLVM compiler infrastructure.
|
||||||
|
|
||||||
@ -191,25 +202,25 @@ pathfix.py -i %{__python3} -pn \
|
|||||||
find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pandoc -f markdown -o ${md%.md}.rst ; done
|
find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pandoc -f markdown -o ${md%.md}.rst ; done
|
||||||
|
|
||||||
%build
|
%build
|
||||||
mkdir -p _build
|
|
||||||
cd _build
|
mkdir -p %{_vpath_builddir}
|
||||||
|
cd %{_vpath_builddir}
|
||||||
|
|
||||||
%ifarch s390 %{arm} %ix86
|
%ifarch s390 %{arm} %ix86
|
||||||
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
# Decrease debuginfo verbosity to reduce memory consumption during final library linking
|
||||||
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
%global optflags %(echo %{optflags} | sed 's/-g /-g1 /')
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# Need to explicitly call set_build_flags if we want to update LDFLAGS
|
||||||
|
%set_build_flags
|
||||||
|
export LDFLAGS="${LDFLAGS} -Wl,--build-id=md5"
|
||||||
|
|
||||||
# force off shared libs as cmake macros turns it on.
|
# force off shared libs as cmake macros turns it on.
|
||||||
#
|
|
||||||
# -DCMAKE_INSTALL_RPATH=";" is a workaround for llvm manually setting the
|
|
||||||
# rpath of libraries and binaries. llvm will skip the manual setting
|
|
||||||
# if CMAKE_INSTALL_RPATH is set to a value, but cmake interprets this value
|
|
||||||
# as nothing, so it sets the rpath to "" when installing.
|
|
||||||
%cmake .. -G Ninja \
|
%cmake .. -G Ninja \
|
||||||
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
-DBUILD_SHARED_LIBS:BOOL=OFF \
|
||||||
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
-DLLVM_PARALLEL_LINK_JOBS=1 \
|
||||||
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
|
||||||
-DCMAKE_INSTALL_RPATH=";" \
|
-DCMAKE_SKIP_RPATH:BOOL=ON \
|
||||||
%ifarch s390 %{arm} %ix86
|
%ifarch s390 %{arm} %ix86
|
||||||
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
-DCMAKE_C_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||||
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
-DCMAKE_CXX_FLAGS_RELWITHDEBINFO="%{optflags} -DNDEBUG" \
|
||||||
@ -222,14 +233,16 @@ cd _build
|
|||||||
%endif
|
%endif
|
||||||
%endif
|
%endif
|
||||||
\
|
\
|
||||||
-DLLVM_TARGETS_TO_BUILD="X86;AMDGPU;PowerPC;NVPTX;SystemZ;AArch64;ARM;Mips;BPF" \
|
-DLLVM_TARGETS_TO_BUILD=%{targets_to_build} \
|
||||||
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
|
-DLLVM_ENABLE_LIBCXX:BOOL=OFF \
|
||||||
-DLLVM_ENABLE_ZLIB:BOOL=ON \
|
-DLLVM_ENABLE_ZLIB:BOOL=ON \
|
||||||
-DLLVM_ENABLE_FFI:BOOL=ON \
|
-DLLVM_ENABLE_FFI:BOOL=ON \
|
||||||
-DLLVM_ENABLE_RTTI:BOOL=ON \
|
-DLLVM_ENABLE_RTTI:BOOL=ON \
|
||||||
|
-DLLVM_USE_PERF:BOOL=ON \
|
||||||
%if %{with gold}
|
%if %{with gold}
|
||||||
-DLLVM_BINUTILS_INCDIR=%{_includedir} \
|
-DLLVM_BINUTILS_INCDIR=%{_includedir} \
|
||||||
%endif
|
%endif
|
||||||
|
-DLLVM_EXPERIMENTAL_TARGETS_TO_BUILD=%{experimental_targets_to_build} \
|
||||||
\
|
\
|
||||||
-DLLVM_BUILD_RUNTIME:BOOL=ON \
|
-DLLVM_BUILD_RUNTIME:BOOL=ON \
|
||||||
\
|
\
|
||||||
@ -277,26 +290,22 @@ cd _build
|
|||||||
%ninja_build
|
%ninja_build
|
||||||
|
|
||||||
%install
|
%install
|
||||||
%ninja_install -C _build
|
%ninja_install -C %{_vpath_builddir}
|
||||||
|
|
||||||
|
mkdir -p %{buildroot}/%{_bindir}
|
||||||
|
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
|
||||||
mv %{buildroot}/%{_bindir}/llvm-config %{buildroot}/%{_bindir}/llvm-config-%{__isa_bits}
|
|
||||||
|
|
||||||
# ghost presence
|
|
||||||
touch %{buildroot}%{_bindir}/llvm-config
|
|
||||||
|
|
||||||
# Fix some man pages
|
# Fix some man pages
|
||||||
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1
|
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config%{exec_suffix}-%{__isa_bits}.1
|
||||||
mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
|
mv %{buildroot}%{_mandir}/man1/*tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
|
||||||
|
|
||||||
# Install binaries needed for lit tests
|
# Install binaries needed for lit tests
|
||||||
%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer
|
%global test_binaries llvm-isel-fuzzer llvm-opt-fuzzer
|
||||||
|
|
||||||
for f in %{test_binaries}
|
for f in %{test_binaries}
|
||||||
do
|
do
|
||||||
install -m 0755 ./_build/bin/$f %{buildroot}%{_bindir}
|
install -m 0755 %{_vpath_builddir}/bin/$f %{buildroot}%{_bindir}
|
||||||
done
|
done
|
||||||
|
|
||||||
# Remove testing of update utility tools
|
# Remove testing of update utility tools
|
||||||
@ -306,9 +315,9 @@ rm -rf test/tools/UpdateTestChecks
|
|||||||
|
|
||||||
# Install libraries needed for unittests
|
# Install libraries needed for unittests
|
||||||
%if 0%{?__isa_bits} == 64
|
%if 0%{?__isa_bits} == 64
|
||||||
%global build_libdir _build/lib64
|
%global build_libdir %{_vpath_builddir}/lib64
|
||||||
%else
|
%else
|
||||||
%global build_libdir _build/lib
|
%global build_libdir %{_vpath_builddir}/lib
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
|
install %{build_libdir}/libLLVMTestingSupport.a %{buildroot}%{_libdir}
|
||||||
@ -336,7 +345,6 @@ ln -s %{_libdir}/LLVMgold.so %{buildroot}%{_libdir}/bfd-plugins/
|
|||||||
%else
|
%else
|
||||||
|
|
||||||
# Add version suffix to binaries
|
# Add version suffix to binaries
|
||||||
mkdir -p %{buildroot}/%{_bindir}
|
|
||||||
for f in %{buildroot}/%{install_bindir}/*; do
|
for f in %{buildroot}/%{install_bindir}/*; do
|
||||||
filename=`basename $f`
|
filename=`basename $f`
|
||||||
ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
||||||
@ -348,7 +356,6 @@ ln -s ../../../%{install_includedir}/llvm %{buildroot}/%{pkg_includedir}/llvm
|
|||||||
ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c
|
ln -s ../../../%{install_includedir}/llvm-c %{buildroot}/%{pkg_includedir}/llvm-c
|
||||||
|
|
||||||
# Fix multi-lib
|
# Fix multi-lib
|
||||||
mv %{buildroot}%{_bindir}/llvm-config{%{exec_suffix},%{exec_suffix}-%{__isa_bits}}
|
|
||||||
%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
|
%multilib_fix_c_header --file %{install_includedir}/llvm/Config/llvm-config.h
|
||||||
|
|
||||||
# Create ld.so.conf.d entry
|
# Create ld.so.conf.d entry
|
||||||
@ -369,40 +376,59 @@ rm -Rf %{build_install_prefix}/share/opt-viewer
|
|||||||
|
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
# llvm-config special casing. llvm-config is managed by update-alternatives.
|
||||||
%check
|
# the original file must remain available for compatibility with the CMake
|
||||||
# TODO: Fix test failures on arm
|
# infrastructure. Without compat, cmake points to the symlink, with compat it
|
||||||
# FIXME: use %%cmake_build instead of %%__ninja
|
# points to the original file.
|
||||||
LD_LIBRARY_PATH=%{buildroot}/%{_libdir} %{__ninja} check-all -C _build || \
|
|
||||||
%ifarch %{arm}
|
|
||||||
:
|
|
||||||
%else
|
|
||||||
false
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%ldconfig_scriptlets libs
|
|
||||||
|
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
|
|
||||||
|
mv %{buildroot}/%{pkg_bindir}/llvm-config %{buildroot}/%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
||||||
|
|
||||||
|
%else
|
||||||
|
|
||||||
|
rm %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
|
||||||
|
(cd %{buildroot}/%{pkg_bindir} ; ln -s llvm-config llvm-config%{exec_suffix}-%{__isa_bits} )
|
||||||
|
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# ghost presence
|
||||||
|
touch %{buildroot}%{_bindir}/llvm-config%{exec_suffix}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
%check
|
||||||
|
# TODO: Fix the failures below
|
||||||
|
%ifarch %{arm}
|
||||||
|
rm test/tools/llvm-readobj/ELF/dependent-libraries.test
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# non reproducible errors
|
||||||
|
rm test/tools/dsymutil/X86/swift-interface.test
|
||||||
|
|
||||||
|
# FIXME: use %%cmake_build instead of %%__ninja
|
||||||
|
LD_LIBRARY_PATH=%{buildroot}/%{pkg_libdir} %{__ninja} check-all -C %{_vpath_builddir}
|
||||||
|
|
||||||
|
%ldconfig_scriptlets libs
|
||||||
|
|
||||||
%post devel
|
%post devel
|
||||||
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config llvm-config %{_bindir}/llvm-config-%{__isa_bits} %{__isa_bits}
|
%{_sbindir}/update-alternatives --install %{_bindir}/llvm-config%{exec_suffix} llvm-config%{exec_suffix} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits} %{__isa_bits}
|
||||||
|
|
||||||
%postun devel
|
%postun devel
|
||||||
if [ $1 -eq 0 ]; then
|
if [ $1 -eq 0 ]; then
|
||||||
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits}
|
%{_sbindir}/update-alternatives --remove llvm-config%{exec_suffix} %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
%endif
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%license LICENSE.TXT
|
%license LICENSE.TXT
|
||||||
%exclude %{_mandir}/man1/llvm-config*
|
%exclude %{_mandir}/man1/llvm-config*
|
||||||
%{_mandir}/man1/*
|
%{_mandir}/man1/*
|
||||||
%{_bindir}/*
|
%{_bindir}/*
|
||||||
|
|
||||||
|
%exclude %{_bindir}/llvm-config%{exec_suffix}
|
||||||
|
%exclude %{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
||||||
|
|
||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
%exclude %{_bindir}/llvm-config
|
|
||||||
%exclude %{_bindir}/llvm-config-%{__isa_bits}
|
|
||||||
%exclude %{_bindir}/not
|
%exclude %{_bindir}/not
|
||||||
%exclude %{_bindir}/count
|
%exclude %{_bindir}/count
|
||||||
%exclude %{_bindir}/yaml-bench
|
%exclude %{_bindir}/yaml-bench
|
||||||
@ -411,7 +437,6 @@ fi
|
|||||||
%exclude %{_bindir}/llvm-opt-fuzzer
|
%exclude %{_bindir}/llvm-opt-fuzzer
|
||||||
%{_datadir}/opt-viewer
|
%{_datadir}/opt-viewer
|
||||||
%else
|
%else
|
||||||
%exclude %{pkg_bindir}/llvm-config
|
|
||||||
%{pkg_bindir}
|
%{pkg_bindir}
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
@ -438,20 +463,17 @@ fi
|
|||||||
|
|
||||||
%files devel
|
%files devel
|
||||||
%license LICENSE.TXT
|
%license LICENSE.TXT
|
||||||
%if %{without compat_build}
|
|
||||||
%ghost %{_bindir}/llvm-config
|
%ghost %{_bindir}/llvm-config%{exec_suffix}
|
||||||
%{_bindir}/llvm-config-%{__isa_bits}
|
%{pkg_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
||||||
%{_mandir}/man1/llvm-config*
|
%{_mandir}/man1/llvm-config*
|
||||||
|
|
||||||
|
%if %{without compat_build}
|
||||||
%{_includedir}/llvm
|
%{_includedir}/llvm
|
||||||
%{_includedir}/llvm-c
|
%{_includedir}/llvm-c
|
||||||
%{_libdir}/libLLVM.so
|
%{_libdir}/libLLVM.so
|
||||||
%{_libdir}/cmake/llvm
|
%{_libdir}/cmake/llvm
|
||||||
%exclude %{_libdir}/cmake/llvm/LLVMStaticExports.cmake
|
|
||||||
%exclude %{_libdir}/cmake/llvm/LLVMTestExports.cmake
|
|
||||||
%else
|
%else
|
||||||
%{_bindir}/llvm-config%{exec_suffix}-%{__isa_bits}
|
|
||||||
%{pkg_bindir}/llvm-config
|
|
||||||
%{_mandir}/man1/llvm-config%{exec_suffix}.1.gz
|
|
||||||
%{install_includedir}/llvm
|
%{install_includedir}/llvm
|
||||||
%{install_includedir}/llvm-c
|
%{install_includedir}/llvm-c
|
||||||
%{pkg_includedir}/llvm
|
%{pkg_includedir}/llvm
|
||||||
@ -470,7 +492,6 @@ fi
|
|||||||
%if %{without compat_build}
|
%if %{without compat_build}
|
||||||
%{_libdir}/*.a
|
%{_libdir}/*.a
|
||||||
%exclude %{_libdir}/libLLVMTestingSupport.a
|
%exclude %{_libdir}/libLLVMTestingSupport.a
|
||||||
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
|
|
||||||
%else
|
%else
|
||||||
%{_libdir}/%{name}/lib/*.a
|
%{_libdir}/%{name}/lib/*.a
|
||||||
%endif
|
%endif
|
||||||
@ -485,7 +506,6 @@ fi
|
|||||||
%{_bindir}/lli-child-target
|
%{_bindir}/lli-child-target
|
||||||
%{_bindir}/llvm-isel-fuzzer
|
%{_bindir}/llvm-isel-fuzzer
|
||||||
%{_bindir}/llvm-opt-fuzzer
|
%{_bindir}/llvm-opt-fuzzer
|
||||||
%{_libdir}/cmake/llvm/LLVMTestExports.cmake
|
|
||||||
|
|
||||||
%files googletest
|
%files googletest
|
||||||
%license LICENSE.TXT
|
%license LICENSE.TXT
|
||||||
@ -495,15 +515,18 @@ fi
|
|||||||
%endif
|
%endif
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
* Sat Sep 04 2021 Tom Stellard <tstellar@redhat.com> - 11.0.1-2
|
* Thu Sep 02 2021 sguelton@redhat.com - 12.0.1-2
|
||||||
- Backport bpftrace fix
|
- Correctly set ldflags
|
||||||
|
|
||||||
* Wed Sep 01 2021 Tom Stellard <tstellar@redhat.com> - 11.0.1-1
|
* Fri Jul 16 2021 sguelton@redhat.com - 12.0.1-1
|
||||||
- 11.0.1 Release
|
- 12.0.1 release
|
||||||
|
|
||||||
* Mon Jul 19 2021 Tom Stellard <tstellar@redhat.com> - 11.0.0-3
|
* Fri Jul 02 2021 Tom Stellard <tstellar@redhat.com> - 12.0.0-2
|
||||||
- Stop installing lit tests
|
- Stop installing lit tests
|
||||||
|
|
||||||
|
* Tue May 25 2021 sguelton@redhat.com - 12.0.0-1
|
||||||
|
- Remove obsolete patch
|
||||||
|
|
||||||
* Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-2
|
* Thu Oct 29 2020 sguelton@redhat.com - 11.0.0-2
|
||||||
- Remove obsolete patch
|
- Remove obsolete patch
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user