parent
b197ecf0e8
commit
6f582f203f
|
@ -0,0 +1 @@
|
|||
llvm9 is no longer provided by Void Linux
|
|
@ -1,9 +0,0 @@
|
|||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include "config-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
#include "config-64.h"
|
||||
#else
|
||||
#error "Unknown word size"
|
||||
#endif
|
|
@ -1,9 +0,0 @@
|
|||
#include <bits/wordsize.h>
|
||||
|
||||
#if __WORDSIZE == 32
|
||||
#include "llvm-config-32.h"
|
||||
#elif __WORDSIZE == 64
|
||||
#include "llvm-config-64.h"
|
||||
#else
|
||||
#error "Unknown word size"
|
||||
#endif
|
|
@ -1,58 +0,0 @@
|
|||
From faca3fbd15d0c3108493c3c54cd93138e049ac43 Mon Sep 17 00:00:00 2001
|
||||
From: Andrea Brancaleoni <miwaxe@gmail.com>
|
||||
Date: Tue, 8 Sep 2015 22:03:02 +0200
|
||||
Subject: [PATCH 3/3] musl
|
||||
|
||||
---
|
||||
include/llvm/Analysis/TargetLibraryInfo.h | 9 +++++++++
|
||||
lib/Support/DynamicLibrary.cpp | 2 +-
|
||||
lib/Support/Unix/Signals.inc | 6 +++---
|
||||
utils/unittest/googletest/src/gtest.cc | 1 +
|
||||
5 files changed, 17 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/include/llvm/Analysis/TargetLibraryInfo.h b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
index e0a1ee3..465b65a 100644
|
||||
--- a/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
+++ b/include/llvm/Analysis/TargetLibraryInfo.h
|
||||
@@ -18,6 +18,15 @@
|
||||
#include "llvm/IR/PassManager.h"
|
||||
#include "llvm/Pass.h"
|
||||
|
||||
+#undef fopen64
|
||||
+#undef fseeko64
|
||||
+#undef fstat64
|
||||
+#undef fstatvfs64
|
||||
+#undef ftello64
|
||||
+#undef lstat64
|
||||
+#undef stat64
|
||||
+#undef tmpfile64
|
||||
+
|
||||
namespace llvm {
|
||||
template <typename T> class ArrayRef;
|
||||
|
||||
diff --git a/utils/unittest/googletest/src/gtest.cc b/utils/unittest/googletest/src/gtest.cc
|
||||
index 5780764..1d548c1 100644
|
||||
--- a/utils/unittest/googletest/src/gtest.cc
|
||||
+++ b/utils/unittest/googletest/src/gtest.cc
|
||||
@@ -128,6 +128,7 @@
|
||||
|
||||
#if GTEST_CAN_STREAM_RESULTS_
|
||||
# include <arpa/inet.h> // NOLINT
|
||||
+# include <sys/socket.h> // NOLINT
|
||||
# include <netdb.h> // NOLINT
|
||||
# include <sys/socket.h> // NOLINT
|
||||
# include <sys/types.h> // NOLINT
|
||||
--
|
||||
2.5.1
|
||||
|
||||
--- a/lib/Support/Unix/DynamicLibrary.inc
|
||||
+++ b/lib/Support/Unix/DynamicLibrary.inc
|
||||
@@ -102,7 +102,7 @@ static void *DoSearch(const char* SymbolName) {
|
||||
|
||||
// This macro returns the address of a well-known, explicit symbol
|
||||
#define EXPLICIT_SYMBOL(SYM) \
|
||||
- if (!strcmp(SymbolName, #SYM)) return &SYM
|
||||
+ if (!strcmp(SymbolName, #SYM)) return (void *)&SYM
|
||||
|
||||
// Under glibc we have a weird situation. The stderr/out/in symbols are both
|
||||
// macros and global variables because of standards requirements. So, we
|
|
@ -1,31 +0,0 @@
|
|||
This patches LLVM to use ELFv2 on ppc64 uncoditionally unless overridden. We
|
||||
need this because unlike most distros we use ELFv2 for both glibc and musl
|
||||
on big endian ppc64.
|
||||
|
||||
--- a/lib/Target/PowerPC/PPCTargetMachine.cpp
|
||||
+++ b/lib/Target/PowerPC/PPCTargetMachine.cpp
|
||||
@@ -211,11 +211,11 @@ static PPCTargetMachine::PPCABI computeTargetABI(const Triple &TT,
|
||||
|
||||
switch (TT.getArch()) {
|
||||
case Triple::ppc64le:
|
||||
- return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||
case Triple::ppc64:
|
||||
- if (TT.getEnvironment() == llvm::Triple::ELFv2)
|
||||
- return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||
- return PPCTargetMachine::PPC_ABI_ELFv1;
|
||||
+ /* default to ELFv2 always, don't care about llvm's stupid broken suffix
|
||||
+ * triples; people can override the default properly via -mabi like gcc
|
||||
+ */
|
||||
+ return PPCTargetMachine::PPC_ABI_ELFv2;
|
||||
default:
|
||||
return PPCTargetMachine::PPC_ABI_UNKNOWN;
|
||||
}
|
||||
--- a/test/CodeGen/PowerPC/ppc64-elf-abi.ll
|
||||
+++ b/test/CodeGen/PowerPC/ppc64-elf-abi.ll
|
||||
@@ -1,4 +1,5 @@
|
||||
-; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
||||
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
||||
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-musl < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv1 < %s | FileCheck %s -check-prefix=CHECK-ELFv1
|
||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64-unknown-linux-gnu -target-abi elfv2 < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
||||
; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-ELFv2
|
|
@ -1,130 +0,0 @@
|
|||
--- llvm/lib/Target/PowerPC/PPCSubtarget.cpp
|
||||
+++ llvm/lib/Target/PowerPC/PPCSubtarget.cpp
|
||||
@@ -145,8 +145,7 @@ void PPCSubtarget::initSubtargetFeatures(StringRef CPU, StringRef FS) {
|
||||
if (isDarwin())
|
||||
HasLazyResolverStubs = true;
|
||||
|
||||
- if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() ||
|
||||
- TargetTriple.isMusl())
|
||||
+ if (TargetTriple.isOSNetBSD() || TargetTriple.isOSOpenBSD() || isTargetLinux())
|
||||
SecurePlt = true;
|
||||
|
||||
if (HasSPE && IsPPC64)
|
||||
--- llvm/lib/Target/PowerPC/PPCISelLowering.cpp
|
||||
+++ llvm/lib/Target/PowerPC/PPCISelLowering.cpp
|
||||
@@ -4941,7 +4945,8 @@ PrepareCall(SelectionDAG &DAG, SDValue &Callee, SDValue &InFlag, SDValue &Chain,
|
||||
if (auto *G = dyn_cast<GlobalAddressSDNode>(Callee))
|
||||
GV = G->getGlobal();
|
||||
bool Local = TM.shouldAssumeDSOLocal(*Mod, GV);
|
||||
- bool UsePlt = !Local && Subtarget.isTargetELF() && !isPPC64;
|
||||
+ bool UsePlt = !Local && Subtarget.isTargetELF() && !isPPC64 &&
|
||||
+ TM.isPositionIndependent();
|
||||
|
||||
if (isFunctionGlobalAddress(Callee)) {
|
||||
GlobalAddressSDNode *G = cast<GlobalAddressSDNode>(Callee);
|
||||
--- llvm/test/CodeGen/PowerPC/2008-10-28-f128-i32.ll
|
||||
+++ llvm/test/CodeGen/PowerPC/2008-10-28-f128-i32.ll
|
||||
@@ -62,7 +62,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: lfd 4, 328(1)
|
||||
; CHECK-NEXT: fmr 1, 31
|
||||
; CHECK-NEXT: fmr 2, 30
|
||||
-; CHECK-NEXT: bl __gcc_qmul@PLT
|
||||
+; CHECK-NEXT: bl __gcc_qmul
|
||||
; CHECK-NEXT: lis 3, 16864
|
||||
; CHECK-NEXT: stfd 1, 280(1)
|
||||
; CHECK-NEXT: fmr 29, 1
|
||||
@@ -84,7 +84,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: lfd 4, 360(1)
|
||||
; CHECK-NEXT: lfd 1, 352(1)
|
||||
; CHECK-NEXT: lfd 2, 344(1)
|
||||
-; CHECK-NEXT: bl __gcc_qsub@PLT
|
||||
+; CHECK-NEXT: bl __gcc_qsub
|
||||
; CHECK-NEXT: mffs 0
|
||||
; CHECK-NEXT: mtfsb1 31
|
||||
; CHECK-NEXT: lis 3, .LCPI0_1@ha
|
||||
@@ -117,7 +117,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: .LBB0_5: # %bb1
|
||||
; CHECK-NEXT: li 4, 0
|
||||
; CHECK-NEXT: mr 3, 30
|
||||
-; CHECK-NEXT: bl __floatditf@PLT
|
||||
+; CHECK-NEXT: bl __floatditf
|
||||
; CHECK-NEXT: lis 3, 17392
|
||||
; CHECK-NEXT: stfd 1, 208(1)
|
||||
; CHECK-NEXT: fmr 29, 1
|
||||
@@ -140,7 +140,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: lfd 4, 232(1)
|
||||
; CHECK-NEXT: lfd 1, 224(1)
|
||||
; CHECK-NEXT: lfd 2, 216(1)
|
||||
-; CHECK-NEXT: bl __gcc_qadd@PLT
|
||||
+; CHECK-NEXT: bl __gcc_qadd
|
||||
; CHECK-NEXT: blt 2, .LBB0_7
|
||||
; CHECK-NEXT: # %bb.6: # %bb1
|
||||
; CHECK-NEXT: fmr 2, 28
|
||||
@@ -163,7 +163,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: stw 3, 248(1)
|
||||
; CHECK-NEXT: lfd 3, 256(1)
|
||||
; CHECK-NEXT: lfd 4, 248(1)
|
||||
-; CHECK-NEXT: bl __gcc_qsub@PLT
|
||||
+; CHECK-NEXT: bl __gcc_qsub
|
||||
; CHECK-NEXT: stfd 2, 176(1)
|
||||
; CHECK-NEXT: fcmpu 0, 2, 27
|
||||
; CHECK-NEXT: stfd 1, 168(1)
|
||||
@@ -205,7 +205,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: lfd 4, 72(1)
|
||||
; CHECK-NEXT: lfd 1, 64(1)
|
||||
; CHECK-NEXT: lfd 2, 56(1)
|
||||
-; CHECK-NEXT: bl __gcc_qsub@PLT
|
||||
+; CHECK-NEXT: bl __gcc_qsub
|
||||
; CHECK-NEXT: mffs 0
|
||||
; CHECK-NEXT: mtfsb1 31
|
||||
; CHECK-NEXT: lis 3, .LCPI0_2@ha
|
||||
@@ -260,7 +260,7 @@ define i64 @__fixunstfdi(ppc_fp128 %a) nounwind readnone {
|
||||
; CHECK-NEXT: lfd 4, 136(1)
|
||||
; CHECK-NEXT: lfd 1, 128(1)
|
||||
; CHECK-NEXT: lfd 2, 120(1)
|
||||
-; CHECK-NEXT: bl __gcc_qsub@PLT
|
||||
+; CHECK-NEXT: bl __gcc_qsub
|
||||
; CHECK-NEXT: mffs 0
|
||||
; CHECK-NEXT: mtfsb1 31
|
||||
; CHECK-NEXT: lis 3, .LCPI0_0@ha
|
||||
--- llvm/test/CodeGen/PowerPC/2010-02-12-saveCR.ll
|
||||
+++ llvm/test/CodeGen/PowerPC/2010-02-12-saveCR.ll
|
||||
@@ -11,7 +11,7 @@ entry:
|
||||
; CHECK-DAG: ori [[T2:[0-9]+]], [[T2]], 34492
|
||||
; CHECK-DAG: stwx [[T1]], 1, [[T2]]
|
||||
; CHECK-DAG: addi 3, 1, 28
|
||||
-; CHECK: bl bar@PLT
|
||||
+; CHECK: bl bar
|
||||
%x = alloca [100000 x i8] ; <[100000 x i8]*> [#uses=1]
|
||||
%"alloca point" = bitcast i32 0 to i32 ; <i32> [#uses=0]
|
||||
%x1 = bitcast [100000 x i8]* %x to i8* ; <i8*> [#uses=1]
|
||||
--- llvm/test/CodeGen/PowerPC/available-externally.ll
|
||||
+++ llvm/test/CodeGen/PowerPC/available-externally.ll
|
||||
@@ -14,7 +14,7 @@ target triple = "powerpc-unknown-linux-gnu"
|
||||
define i32 @foo(i64 %x) nounwind {
|
||||
entry:
|
||||
; STATIC: foo:
|
||||
-; STATIC: bl exact_log2@PLT
|
||||
+; STATIC: bl exact_log2
|
||||
; STATIC: blr
|
||||
|
||||
; PIC: foo:
|
||||
--- llvm/test/CodeGen/PowerPC/stubs.ll
|
||||
+++ llvm/test/CodeGen/PowerPC/stubs.ll
|
||||
@@ -6,4 +6,4 @@ entry:
|
||||
}
|
||||
|
||||
; CHECK: test1:
|
||||
-; CHECK: bl __floatditf@PLT
|
||||
+; CHECK: bl __floatditf
|
||||
--- llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll
|
||||
+++ llvm/test/CodeGen/PowerPC/umulo-128-legalisation-lowering.ll
|
||||
@@ -72,7 +72,7 @@ define { i128, i8 } @muloti_test(i128 %l, i128 %r) unnamed_addr #0 {
|
||||
; PPC32-NEXT: mr 28, 9
|
||||
; PPC32-NEXT: mr 23, 6
|
||||
; PPC32-NEXT: mr 24, 5
|
||||
-; PPC32-NEXT: bl __multi3@PLT
|
||||
+; PPC32-NEXT: bl __multi3
|
||||
; PPC32-NEXT: mr 7, 4
|
||||
; PPC32-NEXT: mullw 4, 24, 30
|
||||
; PPC32-NEXT: mullw 8, 29, 23
|
|
@ -1,18 +0,0 @@
|
|||
This allows us to override the optimization level as not all platforms can
|
||||
deal with -O3.
|
||||
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -893,6 +893,12 @@ if( MINGW AND NOT "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang" )
|
||||
llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "-O2")
|
||||
endif()
|
||||
|
||||
+set(VOID_CXX_OPT_FLAGS "" CACHE STRING "Optimization level to use")
|
||||
+
|
||||
+if(NOT VOID_CXX_OPT_FLAGS STREQUAL "")
|
||||
+ llvm_replace_compiler_option(CMAKE_CXX_FLAGS_RELEASE "-O3" "${VOID_CXX_OPT_FLAGS}")
|
||||
+endif()
|
||||
+
|
||||
# Put this before tblgen. Else we have a circular dependence.
|
||||
add_subdirectory(lib/Demangle)
|
||||
add_subdirectory(lib/Support)
|
|
@ -1,38 +0,0 @@
|
|||
From f3dbdd49c06bfafc1d6138094cf42889c14d38b6 Mon Sep 17 00:00:00 2001
|
||||
From: Samuel Holland <samuel@sholland.org>
|
||||
Date: Sun, 3 Nov 2019 10:57:27 -0600
|
||||
Subject: [PATCH] [LLVM][PowerPC] Assume BigPIC if no PIC level is specified
|
||||
|
||||
---
|
||||
llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp | 2 +-
|
||||
llvm/lib/Target/PowerPC/PPCMCInstLower.cpp | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp b/llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
|
||||
index 269b84b4e8d..03246a5242c 100644
|
||||
--- llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
|
||||
+++ llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
|
||||
@@ -488,7 +488,7 @@ void PPCAsmPrinter::EmitTlsCall(const MachineInstr *MI,
|
||||
|
||||
// Add 32768 offset to the symbol so we follow up the latest GOT/PLT ABI.
|
||||
if (Kind == MCSymbolRefExpr::VK_PLT && Subtarget->isSecurePlt() &&
|
||||
- M->getPICLevel() == PICLevel::BigPIC)
|
||||
+ M->getPICLevel() != PICLevel::SmallPIC)
|
||||
TlsRef = MCBinaryExpr::createAdd(
|
||||
TlsRef, MCConstantExpr::create(32768, OutContext), OutContext);
|
||||
const MachineOperand &MO = MI->getOperand(2);
|
||||
diff --git a/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp b/llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
|
||||
index 027e6bd1ba0..ae461f4eea9 100644
|
||||
--- llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
|
||||
+++ llvm/lib/Target/PowerPC/PPCMCInstLower.cpp
|
||||
@@ -116,7 +116,7 @@ static MCOperand GetSymbolRef(const MachineOperand &MO, const MCSymbol *Symbol,
|
||||
const MCExpr *Expr = MCSymbolRefExpr::create(Symbol, RefKind, Ctx);
|
||||
// If -msecure-plt -fPIC, add 32768 to symbol.
|
||||
if (Subtarget->isSecurePlt() && TM.isPositionIndependent() &&
|
||||
- M->getPICLevel() == PICLevel::BigPIC &&
|
||||
+ M->getPICLevel() != PICLevel::SmallPIC &&
|
||||
MO.getTargetFlags() == PPCII::MO_PLT)
|
||||
Expr =
|
||||
MCBinaryExpr::createAdd(Expr, MCConstantExpr::create(32768, Ctx), Ctx);
|
||||
--
|
||||
2.23.0
|
|
@ -1,110 +0,0 @@
|
|||
From 58e8c793d0e43150a6452e971a32d7407a8a7401 Mon Sep 17 00:00:00 2001
|
||||
From: Tim Northover <tnorthover@apple.com>
|
||||
Date: Mon, 30 Sep 2019 07:46:52 +0000
|
||||
Subject: [PATCH] Revert "[SCEV] add no wrap flag for SCEVAddExpr."
|
||||
|
||||
This reverts r366419 because the analysis performed is within the context of
|
||||
the loop and it's only valid to add wrapping flags to "global" expressions if
|
||||
they're always correct.
|
||||
|
||||
llvm-svn: 373184
|
||||
---
|
||||
llvm/lib/Analysis/ScalarEvolution.cpp | 2 +-
|
||||
llvm/test/Analysis/ScalarEvolution/limit-depth.ll | 2 +-
|
||||
llvm/test/Analysis/ScalarEvolution/nsw.ll | 2 +-
|
||||
llvm/test/Analysis/ScalarEvolution/trip-count12.ll | 2 +-
|
||||
llvm/test/Analysis/ScalarEvolution/trip-count9.ll | 8 ++++----
|
||||
5 files changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Analysis/ScalarEvolution.cpp b/llvm/lib/Analysis/ScalarEvolution.cpp
|
||||
index 354ae05bb841..c29fc5dbccfb 100644
|
||||
--- llvm/lib/Analysis/ScalarEvolution.cpp
|
||||
+++ llvm/lib/Analysis/ScalarEvolution.cpp
|
||||
@@ -4992,7 +4992,7 @@ const SCEV *ScalarEvolution::createSimpleAffineAddRec(PHINode *PN,
|
||||
// overflow.
|
||||
if (auto *BEInst = dyn_cast<Instruction>(BEValueV))
|
||||
if (isLoopInvariant(Accum, L) && isAddRecNeverPoison(BEInst, L))
|
||||
- (void)getAddRecExpr(getAddExpr(StartVal, Accum, Flags), Accum, L, Flags);
|
||||
+ (void)getAddRecExpr(getAddExpr(StartVal, Accum), Accum, L, Flags);
|
||||
|
||||
return PHISCEV;
|
||||
}
|
||||
diff --git a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll b/llvm/test/Analysis/ScalarEvolution/limit-depth.ll
|
||||
index db68a4f84c91..6fdf8c5df974 100644
|
||||
--- llvm/test/Analysis/ScalarEvolution/limit-depth.ll
|
||||
+++ llvm/test/Analysis/ScalarEvolution/limit-depth.ll
|
||||
@@ -46,7 +46,7 @@ define void @test_mul(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) {
|
||||
define void @test_sext(i32 %a, i32 %b, i32 %c, i32 %d, i32 %e, i32 %f) {
|
||||
; CHECK-LABEL: @test_sext
|
||||
; CHECK: %se2 = sext i64 %iv2.inc to i128
|
||||
-; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a)<nsw> to i64),+,1}<nsw><%loop> to i128))<nsw>,+,1}<nsw><%loop2>
|
||||
+; CHECK-NEXT: --> {(1 + (sext i64 {(sext i32 (1 + %a) to i64),+,1}<nsw><%loop> to i128))<nsw>,+,1}<nsw><%loop2>
|
||||
entry:
|
||||
br label %loop
|
||||
|
||||
diff --git a/llvm/test/Analysis/ScalarEvolution/nsw.ll b/llvm/test/Analysis/ScalarEvolution/nsw.ll
|
||||
index 69427368625d..ca24f9d4a04b 100644
|
||||
--- llvm/test/Analysis/ScalarEvolution/nsw.ll
|
||||
+++ llvm/test/Analysis/ScalarEvolution/nsw.ll
|
||||
@@ -163,7 +163,7 @@ bb5: ; preds = %bb2
|
||||
declare void @f(i32)
|
||||
|
||||
; CHECK-LABEL: nswnowrap
|
||||
-; CHECK: --> {(1 + %v)<nsw>,+,1}<nsw><%for.body>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (2 + %v)
|
||||
+; CHECK: --> {(1 + %v)<nsw>,+,1}<nsw><%for.body>{{ U: [^ ]+ S: [^ ]+}}{{ *}}Exits: (1 + ((1 + %v)<nsw> smax %v))
|
||||
define void @nswnowrap(i32 %v, i32* %buf) {
|
||||
entry:
|
||||
%add = add nsw i32 %v, 1
|
||||
diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll b/llvm/test/Analysis/ScalarEvolution/trip-count12.ll
|
||||
index 5e7d72d5e4f3..d0086ee2e6ac 100644
|
||||
--- llvm/test/Analysis/ScalarEvolution/trip-count12.ll
|
||||
+++ llvm/test/Analysis/ScalarEvolution/trip-count12.ll
|
||||
@@ -1,7 +1,7 @@
|
||||
; RUN: opt < %s -analyze -scalar-evolution | FileCheck %s
|
||||
|
||||
; CHECK: Determining loop execution counts for: @test
|
||||
-; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len)<nsw> /u 2)
|
||||
+; CHECK: Loop %for.body: backedge-taken count is ((-2 + %len) /u 2)
|
||||
; CHECK: Loop %for.body: max backedge-taken count is 1073741823
|
||||
|
||||
define zeroext i16 @test(i16* nocapture %p, i32 %len) nounwind readonly {
|
||||
diff --git a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll b/llvm/test/Analysis/ScalarEvolution/trip-count9.ll
|
||||
index c0a1d12fa00e..9a080b34743f 100644
|
||||
--- llvm/test/Analysis/ScalarEvolution/trip-count9.ll
|
||||
+++ llvm/test/Analysis/ScalarEvolution/trip-count9.ll
|
||||
@@ -179,7 +179,7 @@ exit:
|
||||
}
|
||||
|
||||
; CHECK: Determining loop execution counts for: @nsw_startx
|
||||
-; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x)<nsw> smax %n))
|
||||
+; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax %n))
|
||||
; CHECK: Loop %loop: max backedge-taken count is -1
|
||||
define void @nsw_startx(i4 %n, i4 %x) {
|
||||
entry:
|
||||
@@ -195,7 +195,7 @@ exit:
|
||||
}
|
||||
|
||||
; CHECK: Determining loop execution counts for: @nsw_startx_step2
|
||||
-; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x)<nsw> smax %n)) /u 2)
|
||||
+; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax %n)) /u 2)
|
||||
; CHECK: Loop %loop: max backedge-taken count is 7
|
||||
define void @nsw_startx_step2(i4 %n, i4 %x) {
|
||||
entry:
|
||||
@@ -381,7 +381,7 @@ exit:
|
||||
}
|
||||
|
||||
; CHECK: Determining loop execution counts for: @even_nsw_startx
|
||||
-; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x)<nsw> smax (2 * %n)))
|
||||
+; CHECK: Loop %loop: backedge-taken count is (-1 + (-1 * %x) + ((1 + %x) smax (2 * %n)))
|
||||
; CHECK: Loop %loop: max backedge-taken count is -2
|
||||
define void @even_nsw_startx(i4 %n, i4 %x) {
|
||||
entry:
|
||||
@@ -398,7 +398,7 @@ exit:
|
||||
}
|
||||
|
||||
; CHECK: Determining loop execution counts for: @even_nsw_startx_step2
|
||||
-; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x)<nsw> smax (2 * %n))) /u 2)
|
||||
+; CHECK: Loop %loop: backedge-taken count is ((-1 + (-1 * %x) + ((2 + %x) smax (2 * %n))) /u 2)
|
||||
; CHECK: Loop %loop: max backedge-taken count is 7
|
||||
define void @even_nsw_startx_step2(i4 %n, i4 %x) {
|
||||
entry:
|
|
@ -1,25 +0,0 @@
|
|||
Fix failures in AllocationTests/MappedMemoryTest.* on aarch64:
|
||||
|
||||
Failing Tests (8):
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.AllocAndRelease/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.DuplicateNear/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.EnabledWrite/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.MultipleAllocAndRelease/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.SuccessiveNear/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.UnalignedNear/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroNear/3
|
||||
LLVM-Unit :: Support/./SupportTests/AllocationTests/MappedMemoryTest.ZeroSizeNear/3
|
||||
|
||||
Upstream-Issue: https://bugs.llvm.org/show_bug.cgi?id=14278#c10
|
||||
|
||||
--- a/lib/Support/Unix/Memory.inc
|
||||
+++ b/lib/Support/Unix/Memory.inc
|
||||
@@ -59,7 +59,7 @@
|
||||
return PROT_READ | PROT_WRITE | PROT_EXEC;
|
||||
case llvm::sys::Memory::MF_EXEC:
|
||||
#if (defined(__FreeBSD__) || defined(__POWERPC__) || defined (__ppc__) || \
|
||||
- defined(_POWER) || defined(_ARCH_PPC))
|
||||
+ defined(_POWER) || defined(_ARCH_PPC) || (defined(__linux__) && defined(__aarch64__)))
|
||||
// On PowerPC, having an executable page that has no read permission
|
||||
// can have unintended consequences. The function InvalidateInstruction-
|
||||
// Cache uses instructions dcbf and icbi, both of which are treated by
|
|
@ -1,108 +1,14 @@
|
|||
# Template file for 'llvm9'
|
||||
pkgname=llvm9
|
||||
version=9.0.1
|
||||
revision=6
|
||||
wrksrc="llvm-${version}.src"
|
||||
build_style=cmake
|
||||
configure_args="
|
||||
-DCMAKE_BUILD_TYPE=Release
|
||||
-DLLVM_INSTALL_UTILS=ON
|
||||
-DLLVM_BUILD_LLVM_DYLIB=ON
|
||||
-DLLVM_LINK_LLVM_DYLIB=ON
|
||||
-DLLVM_ENABLE_RTTI=ON
|
||||
-DLLVM_ENABLE_FFI=ON
|
||||
-DLLVM_BINUTILS_INCDIR=/usr/include"
|
||||
hostmakedepends="groff perl python3 zlib-devel libffi-devel swig"
|
||||
makedepends="python3-devel zlib-devel libffi-devel libedit-devel
|
||||
libxml2-devel binutils-devel libatomic-devel"
|
||||
depends="libllvm9"
|
||||
short_desc="Low Level Virtual Machine"
|
||||
revision=7
|
||||
archs=noarch
|
||||
build_style=meta
|
||||
short_desc="Low Level Virtual Machine (removed package)"
|
||||
maintainer="q66 <daniel@octaforge.org>"
|
||||
license="NCSA"
|
||||
license="metapackage"
|
||||
homepage="https://www.llvm.org"
|
||||
distfiles="https://github.com/llvm/llvm-project/releases/download/llvmorg-${version}/llvm-${version}.src.tar.xz"
|
||||
checksum="00a1ee1f389f81e9979f3a640a01c431b3021de0d42278f6508391a2f0b81c9a"
|
||||
lib32disabled=yes
|
||||
python_version=3
|
||||
|
||||
conflicts="llvm10>=0"
|
||||
|
||||
subpackages="libllvm9"
|
||||
|
||||
post_patch() {
|
||||
# patches
|
||||
cd ${XBPS_BUILDDIR}/llvm-${version}.src
|
||||
for i in ${FILESDIR}/patches/llvm/llvm-*.patch; do
|
||||
msg_normal "Applying $i to llvm\n"
|
||||
patch -sNp1 -i ${i}
|
||||
done
|
||||
}
|
||||
|
||||
pre_configure() {
|
||||
# Vastly reduce size of debugging symbols:
|
||||
CFLAGS=${CFLAGS/ -g/ -g1}
|
||||
CXXFLAGS=${CXXFLAGS/ -g/ -g1}
|
||||
|
||||
# since gcc9, the build likes to blow up for ppc32 apparently because
|
||||
# of clang being too large for a 24-bit relative call to the PLT, so
|
||||
# optimize for size instead
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
ppc|ppc-musl) configure_args+=" -DVOID_CXX_OPT_FLAGS=-Os" ;;
|
||||
esac
|
||||
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
msg_normal "Building host tblgen\n"
|
||||
mkdir -p build/HOST
|
||||
cd build/HOST
|
||||
CC="$BUILD_CC" CXX="$BUILD_CXX" CFLAGS="$BUILD_CFLAGS" \
|
||||
CXXFLAGS="$BUILD_CXXFLAGS" LDFLAGS="$BUILD_LDFLAGS" \
|
||||
cmake ../.. -DCMAKE_BUILD_TYPE=Release
|
||||
make ${makejobs} -C utils/TableGen
|
||||
configure_args+=" -DLLVM_TABLEGEN=${wrksrc}/build/HOST/bin/llvm-tblgen"
|
||||
cd ../..
|
||||
fi
|
||||
|
||||
case "$XBPS_TARGET_MACHINE" in
|
||||
i686*) _arch="X86";;
|
||||
x86_64*) _arch="X86";;
|
||||
armv5*) _arch="Armv5te";;
|
||||
armv6*) _arch="Armv6";;
|
||||
armv7*) _arch="Armv7";;
|
||||
aarch64*) _arch="AArch64";;
|
||||
mips*) _arch="Mips";;
|
||||
ppc*) _arch="PowerPC";;
|
||||
esac
|
||||
configure_args+=" -DLLVM_TARGET_ARCH=${_arch}"
|
||||
configure_args+=" -DLLVM_DEFAULT_TARGET_TRIPLE=${XBPS_CROSS_TRIPLET:-$XBPS_TRIPLET}"
|
||||
}
|
||||
|
||||
do_install() {
|
||||
vlicense LICENSE.TXT
|
||||
|
||||
cd build
|
||||
cmake -DCMAKE_INSTALL_PREFIX=${DESTDIR}/usr -P cmake_install.cmake
|
||||
|
||||
# Fix permissions of static libs
|
||||
chmod -x ${DESTDIR}/usr/lib/*.a
|
||||
|
||||
# Required for multilib.
|
||||
if [ "$XBPS_TARGET_MACHINE" = "x86_64" ]; then
|
||||
for _header in llvm-config; do
|
||||
mv ${DESTDIR}/usr/include/llvm/Config/${_header}{,-64}.h
|
||||
vinstall ${FILESDIR}/llvm-Config-${_header}.h 644 \
|
||||
usr/include/llvm/Config ${_header}.h
|
||||
done
|
||||
fi
|
||||
|
||||
# Remove llvm-config-host in cross builds.
|
||||
if [ "$CROSS_BUILD" ]; then
|
||||
rm -f ${DESTDIR}/usr/bin/llvm-config-host
|
||||
fi
|
||||
}
|
||||
|
||||
libllvm9_package() {
|
||||
short_desc+=" - runtime library"
|
||||
pkg_install() {
|
||||
vmove "usr/lib/libLLVM-*.so*"
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
site=https://releases.llvm.org/
|
||||
pattern="'\K[\d\.]*(?=')"
|
Loading…
Reference in New Issue