import llvm-10.0.1-3.module+el8.3.0+7719+53d428de
This commit is contained in:
parent
1fb18cdecb
commit
c5ab221a0c
2
.gitignore
vendored
2
.gitignore
vendored
@ -1 +1 @@
|
||||
SOURCES/llvm-9.0.1.src.tar.xz
|
||||
SOURCES/llvm-10.0.1.src.tar.xz
|
||||
|
@ -1 +1 @@
|
||||
f7fcf3bd92d130784513c06efe6910f135372ce3 SOURCES/llvm-9.0.1.src.tar.xz
|
||||
25d07260f3b7bf4f647e115c4a663fdeda130fbd SOURCES/llvm-10.0.1.src.tar.xz
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -1,138 +0,0 @@
|
||||
From f2ccdd2700174c717dc55a0f4c3f5a91ae73ff42 Mon Sep 17 00:00:00 2001
|
||||
From: Yonghong Song <yhs@fb.com>
|
||||
Date: Fri, 2 Aug 2019 21:28:28 +0000
|
||||
Subject: [PATCH] [BPF] annotate DIType metadata for builtin
|
||||
preseve_array_access_index()
|
||||
|
||||
Previously, debuginfo types are annotated to
|
||||
IR builtin preserve_struct_access_index() and
|
||||
preserve_union_access_index(), but not
|
||||
preserve_array_access_index(). The debug info
|
||||
is useful to identify the root type name which
|
||||
later will be used for type comparison.
|
||||
|
||||
For user access without explicit type conversions,
|
||||
the previous scheme works as we can ignore intermediate
|
||||
compiler generated type conversions (e.g., from union types to
|
||||
union members) and still generate correct access index string.
|
||||
|
||||
The issue comes with user explicit type conversions, e.g.,
|
||||
converting an array to a structure like below:
|
||||
struct t { int a; char b[40]; };
|
||||
struct p { int c; int d; };
|
||||
struct t *var = ...;
|
||||
... __builtin_preserve_access_index(&(((struct p *)&(var->b[0]))->d)) ...
|
||||
Although BPF backend can derive the type of &(var->b[0]),
|
||||
explicit type annotation make checking more consistent
|
||||
and less error prone.
|
||||
|
||||
Another benefit is for multiple dimension array handling.
|
||||
For example,
|
||||
struct p { int c; int d; } g[8][9][10];
|
||||
... __builtin_preserve_access_index(&g[2][3][4].d) ...
|
||||
It would be possible to calculate the number of "struct p"'s
|
||||
before accessing its member "d" if array debug info is
|
||||
available as it contains each dimension range.
|
||||
|
||||
This patch enables to annotate IR builtin preserve_array_access_index()
|
||||
with proper debuginfo type. The unit test case and language reference
|
||||
is updated as well.
|
||||
|
||||
Signed-off-by: Yonghong Song <yhs@fb.com>
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D65664
|
||||
|
||||
llvm-svn: 367724
|
||||
(cherry picked from commit d0ea05d5eff475a27a5d3bbe4d9fd389935f9cb2)
|
||||
|
||||
Also added back
|
||||
Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
|
||||
unsigned LastIndex);
|
||||
|
||||
To avoid breaking the ABI.
|
||||
---
|
||||
clang/lib/CodeGen/CGExpr.cpp | 12 ++++++++---
|
||||
.../CodeGen/builtin-preserve-access-index-array.c | 18 +++++++++++++++++
|
||||
clang/test/CodeGen/builtin-preserve-access-index.c | 23 +++++++++++-----------
|
||||
llvm/docs/LangRef.rst | 4 ++++
|
||||
llvm/include/llvm/IR/IRBuilder.h | 13 ++++++++++--
|
||||
llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll | 2 +-
|
||||
6 files changed, 55 insertions(+), 17 deletions(-)
|
||||
create mode 100644 clang/test/CodeGen/builtin-preserve-access-index-array.c
|
||||
|
||||
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
|
||||
index 87e8a55..b63e3af 100644
|
||||
--- a/llvm/docs/LangRef.rst
|
||||
+++ b/llvm/docs/LangRef.rst
|
||||
@@ -17349,6 +17349,10 @@ based on array base ``base``, array dimension ``dim`` and the last access index
|
||||
into the array. The return type ``ret_type`` is a pointer type to the array element.
|
||||
The array ``dim`` and ``index`` are preserved which is more robust than
|
||||
getelementptr instruction which may be subject to compiler transformation.
|
||||
+The ``llvm.preserve.access.index`` type of metadata is attached to this call instruction
|
||||
+to provide array or pointer debuginfo type.
|
||||
+The metadata is a ``DICompositeType`` or ``DIDerivedType`` representing the
|
||||
+debuginfo version of ``type``.
|
||||
|
||||
Arguments:
|
||||
""""""""""
|
||||
diff --git a/llvm/include/llvm/IR/IRBuilder.h b/llvm/include/llvm/IR/IRBuilder.h
|
||||
index a74364d..c2fa9a3 100644
|
||||
--- a/llvm/include/llvm/IR/IRBuilder.h
|
||||
+++ b/llvm/include/llvm/IR/IRBuilder.h
|
||||
@@ -2455,6 +2455,11 @@ public:
|
||||
|
||||
Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
|
||||
unsigned LastIndex) {
|
||||
+ return CreatePreserveArrayAccessIndex(Base, Dimension, LastIndex, nullptr);
|
||||
+ }
|
||||
+
|
||||
+ Value *CreatePreserveArrayAccessIndex(Value *Base, unsigned Dimension,
|
||||
+ unsigned LastIndex, MDNode *DbgInfo) {
|
||||
assert(isa<PointerType>(Base->getType()) &&
|
||||
"Invalid Base ptr type for preserve.array.access.index.");
|
||||
auto *BaseType = Base->getType();
|
||||
@@ -2476,6 +2481,8 @@ public:
|
||||
Value *DimV = getInt32(Dimension);
|
||||
CallInst *Fn =
|
||||
CreateCall(FnPreserveArrayAccessIndex, {Base, DimV, LastIndexV});
|
||||
+ if (DbgInfo)
|
||||
+ Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo);
|
||||
|
||||
return Fn;
|
||||
}
|
||||
@@ -2493,7 +2500,8 @@ public:
|
||||
Value *DIIndex = getInt32(FieldIndex);
|
||||
CallInst *Fn =
|
||||
CreateCall(FnPreserveUnionAccessIndex, {Base, DIIndex});
|
||||
- Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo);
|
||||
+ if (DbgInfo)
|
||||
+ Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo);
|
||||
|
||||
return Fn;
|
||||
}
|
||||
@@ -2516,7 +2524,8 @@ public:
|
||||
Value *DIIndex = getInt32(FieldIndex);
|
||||
CallInst *Fn = CreateCall(FnPreserveStructAccessIndex,
|
||||
{Base, GEPIndex, DIIndex});
|
||||
- Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo);
|
||||
+ if (DbgInfo)
|
||||
+ Fn->setMetadata(LLVMContext::MD_preserve_access_index, DbgInfo);
|
||||
|
||||
return Fn;
|
||||
}
|
||||
diff --git a/llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll b/llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll
|
||||
index adbcb9f..fe2c196 100644
|
||||
--- a/llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll
|
||||
+++ b/llvm/test/CodeGen/BPF/CORE/intrinsic-array.ll
|
||||
@@ -14,7 +14,7 @@
|
||||
define dso_local i32 @test(%struct.s* %arg) local_unnamed_addr #0 !dbg !7 {
|
||||
entry:
|
||||
call void @llvm.dbg.value(metadata %struct.s* %arg, metadata !17, metadata !DIExpression()), !dbg !18
|
||||
- %0 = tail call %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s* %arg, i32 0, i32 2), !dbg !19
|
||||
+ %0 = tail call %struct.s* @llvm.preserve.array.access.index.p0s_struct.ss.p0s_struct.ss(%struct.s* %arg, i32 0, i32 2), !dbg !19, !llvm.preserve.access.index !11
|
||||
%1 = tail call i32* @llvm.preserve.struct.access.index.p0i32.p0s_struct.ss(%struct.s* %0, i32 1, i32 1), !dbg !19, !llvm.preserve.access.index !12
|
||||
%2 = bitcast i32* %1 to i8*, !dbg !19
|
||||
%call = tail call i32 @get_value(i8* %2) #4, !dbg !20
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,223 +0,0 @@
|
||||
From 8987da9a2cac6c5bd39ba100ffd1aaede94dc6a0 Mon Sep 17 00:00:00 2001
|
||||
From: Michael Pozulp <pozulp.llvm@gmail.com>
|
||||
Date: Fri, 9 Aug 2019 19:10:55 +0000
|
||||
Subject: [PATCH] [Docs][llvm-strip] Add help text to llvm-strip rst doc
|
||||
|
||||
Summary: Addresses https://bugs.llvm.org/show_bug.cgi?id=42383
|
||||
|
||||
Reviewers: jhenderson, alexshap, rupprecht
|
||||
|
||||
Reviewed By: jhenderson
|
||||
|
||||
Subscribers: wolfgangp, jakehehrlich, llvm-commits
|
||||
|
||||
Tags: #llvm
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D65384
|
||||
|
||||
llvm-svn: 368464
|
||||
---
|
||||
llvm/docs/CommandGuide/llvm-strip.md | 16 ----
|
||||
llvm/docs/CommandGuide/llvm-strip.rst | 167 ++++++++++++++++++++++++++++++++++
|
||||
2 files changed, 167 insertions(+), 16 deletions(-)
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-strip.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-strip.rst
|
||||
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strip.md b/llvm/docs/CommandGuide/llvm-strip.md
|
||||
deleted file mode 100644
|
||||
index dd6e859..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-strip.md
|
||||
+++ /dev/null
|
||||
@@ -1,16 +0,0 @@
|
||||
-# llvm-strip - object stripping tool
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-strip** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-strip** is a tool to strip sections and symbols from object files.
|
||||
-
|
||||
-The tool is still in active development, but in most scenarios it works as a
|
||||
-drop-in replacement for GNU's **strip**.
|
||||
-
|
||||
-## SEE ALSO
|
||||
-
|
||||
-[llvm-objcopy](llvm-objcopy.html)
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strip.rst b/llvm/docs/CommandGuide/llvm-strip.rst
|
||||
new file mode 100644
|
||||
index 0000000..6e02482
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-strip.rst
|
||||
@@ -0,0 +1,167 @@
|
||||
+llvm-strip - object stripping tool
|
||||
+==================================
|
||||
+
|
||||
+.. program:: llvm-strip
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-strip` [*options*] *inputs...*
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-strip` is a tool to strip sections and symbols from object files.
|
||||
+If no other stripping or remove options are specified, :option:`--strip-all`
|
||||
+will be enabled by default.
|
||||
+
|
||||
+The input files are modified in-place. If "-" is specified for the input file,
|
||||
+the input is read from the program's standard input stream.
|
||||
+
|
||||
+If the input is an archive, any requested operations will be applied to each
|
||||
+archive member individually.
|
||||
+
|
||||
+The tool is still in active development, but in most scenarios it works as a
|
||||
+drop-in replacement for GNU's :program:`strip`.
|
||||
+
|
||||
+GENERIC AND CROSS-PLATFORM OPTIONS
|
||||
+----------------------------------
|
||||
+
|
||||
+The following options are either agnostic of the file format, or apply to
|
||||
+multiple file formats.
|
||||
+
|
||||
+.. option:: --disable-deterministic-archives, -U
|
||||
+
|
||||
+ Use real values for UIDs, GIDs and timestamps when updating archive member
|
||||
+ headers.
|
||||
+
|
||||
+.. option:: --discard-all, -x
|
||||
+
|
||||
+ Remove most local symbols from the output. Different file formats may limit
|
||||
+ this to a subset of the local symbols. For example, file and section symbols in
|
||||
+ ELF objects will not be discarded.
|
||||
+
|
||||
+.. option:: --enable-deterministic-archives, -D
|
||||
+
|
||||
+ Enable deterministic mode when stripping archives, i.e. use 0 for archive member
|
||||
+ header UIDs, GIDs and timestamp fields. On by default.
|
||||
+
|
||||
+.. option:: --help, -h
|
||||
+
|
||||
+ Print a summary of command line options.
|
||||
+
|
||||
+.. option:: --no-strip-all
|
||||
+
|
||||
+ Disable --strip-all.
|
||||
+
|
||||
+.. option:: -o <file>
|
||||
+
|
||||
+ Write output to <file>. Multiple input files cannot be used in combination
|
||||
+ with -o.
|
||||
+
|
||||
+.. option:: --regex
|
||||
+
|
||||
+ If specified, symbol and section names specified by other switches are treated
|
||||
+ as extended POSIX regular expression patterns.
|
||||
+
|
||||
+.. option:: --remove-section <section>, -R
|
||||
+
|
||||
+ Remove the specified section from the output. Can be specified multiple times
|
||||
+ to remove multiple sections simultaneously.
|
||||
+
|
||||
+.. option:: --strip-all-gnu
|
||||
+
|
||||
+ Remove all symbols, debug sections and relocations from the output. This option
|
||||
+ is equivalent to GNU :program:`strip`'s ``--strip-all`` switch.
|
||||
+
|
||||
+.. option:: --strip-all, -S
|
||||
+
|
||||
+ For ELF objects, remove from the output all symbols and non-alloc sections not
|
||||
+ within segments, except for .gnu.warning sections and the section name table.
|
||||
+
|
||||
+ For COFF objects, remove all symbols, debug sections, and relocations from the
|
||||
+ output.
|
||||
+
|
||||
+.. option:: --strip-debug, -g
|
||||
+
|
||||
+ Remove all debug sections.
|
||||
+
|
||||
+.. option:: --strip-sections
|
||||
+
|
||||
+ Remove all section headers and all sections not in segments.
|
||||
+
|
||||
+.. option:: --strip-symbol <symbol>, -N
|
||||
+
|
||||
+ Remove all symbols named ``<symbol>`` from the output. Can be specified
|
||||
+ multiple times to remove multiple symbols.
|
||||
+
|
||||
+.. option:: --strip-unneeded
|
||||
+
|
||||
+ Remove all local or undefined symbols that are not required by relocations.
|
||||
+
|
||||
+.. option:: --version, -V
|
||||
+
|
||||
+ Display the version of this program.
|
||||
+
|
||||
+COFF-SPECIFIC OPTIONS
|
||||
+---------------------
|
||||
+
|
||||
+The following options are implemented only for COFF objects. If used with other
|
||||
+objects, :program:`llvm-strip` will either emit an error or silently ignore
|
||||
+them.
|
||||
+
|
||||
+.. option:: --only-keep-debug
|
||||
+
|
||||
+ Remove the contents of non-debug sections from the output, but keep the section
|
||||
+ headers.
|
||||
+
|
||||
+ELF-SPECIFIC OPTIONS
|
||||
+--------------------
|
||||
+
|
||||
+The following options are implemented only for ELF objects. If used with other
|
||||
+objects, :program:`llvm-strip` will either emit an error or silently ignore
|
||||
+them.
|
||||
+
|
||||
+.. option:: --allow-broken-links
|
||||
+
|
||||
+ Allow llvm-strip to remove sections even if it would leave invalid section
|
||||
+ references. Any invalid sh_link fields will be set to zero.
|
||||
+
|
||||
+.. option:: --discard-locals, -X
|
||||
+
|
||||
+ Remove local symbols starting with ".L" from the output.
|
||||
+
|
||||
+.. option:: --keep-file-symbols
|
||||
+
|
||||
+ Keep symbols of type `STT_FILE`, even if they would otherwise be stripped.
|
||||
+
|
||||
+ .. option:: --keep-section <section>
|
||||
+
|
||||
+ When removing sections from the output, do not remove sections named
|
||||
+ ``<section>``. Can be specified multiple times to keep multiple sections.
|
||||
+
|
||||
+.. option:: --keep-symbol <symbol>, -K
|
||||
+
|
||||
+ Do not remove symbols named ``<symbol>``. Can be specified multiple times to
|
||||
+ keep multiple symbols.
|
||||
+
|
||||
+.. option:: --preserve-dates, -p
|
||||
+
|
||||
+ Preserve access and modification timestamps.
|
||||
+
|
||||
+
|
||||
+EXIT STATUS
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-strip` exits with a non-zero exit code if there is an error.
|
||||
+Otherwise, it exits with code 0.
|
||||
+
|
||||
+BUGS
|
||||
+----
|
||||
+
|
||||
+To report bugs, please visit <http://llvm.org/bugs/>.
|
||||
+
|
||||
+SEE ALSO
|
||||
+--------
|
||||
+
|
||||
+:manpage:`llvm-objcopy(1)`
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,28 +0,0 @@
|
||||
From d15c835028bcc72a8695d047f0acaa530aa54716 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 31 Jul 2019 20:43:42 -0700
|
||||
Subject: [PATCH] Filter out cxxflags not supported by clang
|
||||
|
||||
---
|
||||
llvm/tools/llvm-config/CMakeLists.txt | 4 ++++
|
||||
1 file changed, 4 insertions(+)
|
||||
|
||||
diff --git a/llvm/tools/llvm-config/CMakeLists.txt b/llvm/tools/llvm-config/CMakeLists.txt
|
||||
index 8e97a10..9b9b7d1 100644
|
||||
--- a/llvm/tools/llvm-config/CMakeLists.txt
|
||||
+++ b/llvm/tools/llvm-config/CMakeLists.txt
|
||||
@@ -43,7 +43,11 @@ set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
|
||||
set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
|
||||
set(LLVM_CPPFLAGS "${LLVM_DEFINITIONS}")
|
||||
set(LLVM_CFLAGS "${LLVM_C_STD_FLAG} ${LLVM_DEFINITIONS}")
|
||||
+STRING(REGEX REPLACE "-mcet" "" LLVM_CFLAGS ${LLVM_CFLAGS})
|
||||
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CFLAGS ${LLVM_CFLAGS})
|
||||
set(LLVM_CXXFLAGS "${LLVM_CXX_STD_FLAG} ${LLVM_CXX_STDLIB_FLAG} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
|
||||
+STRING(REGEX REPLACE "-mcet" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
|
||||
+STRING(REGEX REPLACE "-fcf-protection" "" LLVM_CXXFLAGS ${LLVM_CXXFLAGS})
|
||||
set(LLVM_BUILD_SYSTEM cmake)
|
||||
set(LLVM_HAS_RTTI ${LLVM_CONFIG_HAS_RTTI})
|
||||
set(LLVM_DYLIB_VERSION "${LLVM_VERSION_MAJOR}${LLVM_VERSION_SUFFIX}")
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -1,192 +0,0 @@
|
||||
From f8e146f3430de3a6cd904f3f3f7aa1bfaefee14c Mon Sep 17 00:00:00 2001
|
||||
From: Bjorn Pettersson <bjorn.a.pettersson@ericsson.com>
|
||||
Date: Thu, 28 Nov 2019 23:18:28 +0100
|
||||
Subject: [PATCH] [InstCombine] Fix big-endian miscompile of (bitcast
|
||||
(zext/trunc (bitcast)))
|
||||
|
||||
Summary:
|
||||
optimizeVectorResize is rewriting patterns like:
|
||||
%1 = bitcast vector %src to integer
|
||||
%2 = trunc/zext %1
|
||||
%dst = bitcast %2 to vector
|
||||
|
||||
Since bitcasting between integer an vector types gives
|
||||
different integer values depending on endianness, we need
|
||||
to take endianness into account. As it happens the old
|
||||
implementation only produced the correct result for little
|
||||
endian targets.
|
||||
|
||||
Fixes: https://bugs.llvm.org/show_bug.cgi?id=44178
|
||||
|
||||
Reviewers: spatel, lattner, lebedev.ri
|
||||
|
||||
Reviewed By: spatel, lebedev.ri
|
||||
|
||||
Subscribers: lebedev.ri, hiraditya, uabelho, llvm-commits
|
||||
|
||||
Tags: #llvm
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D70844
|
||||
|
||||
(cherry picked from commit a9d6b0e5444741d08ff1df7cf71d1559e7fefc1f)
|
||||
---
|
||||
.../InstCombine/InstCombineCasts.cpp | 79 +++++++++++++------
|
||||
llvm/test/Transforms/InstCombine/cast.ll | 6 +-
|
||||
2 files changed, 60 insertions(+), 25 deletions(-)
|
||||
|
||||
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
||||
index 2c9ba203fbf3..0af3de300e77 100644
|
||||
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
||||
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
|
||||
@@ -18,6 +18,7 @@
|
||||
#include "llvm/IR/DIBuilder.h"
|
||||
#include "llvm/IR/PatternMatch.h"
|
||||
#include "llvm/Support/KnownBits.h"
|
||||
+#include <numeric>
|
||||
using namespace llvm;
|
||||
using namespace PatternMatch;
|
||||
|
||||
@@ -1820,12 +1821,24 @@ Instruction *InstCombiner::visitPtrToInt(PtrToIntInst &CI) {
|
||||
}
|
||||
|
||||
/// This input value (which is known to have vector type) is being zero extended
|
||||
-/// or truncated to the specified vector type.
|
||||
+/// or truncated to the specified vector type. Since the zext/trunc is done
|
||||
+/// using an integer type, we have a (bitcast(cast(bitcast))) pattern,
|
||||
+/// endianness will impact which end of the vector that is extended or
|
||||
+/// truncated.
|
||||
+///
|
||||
+/// A vector is always stored with index 0 at the lowest address, which
|
||||
+/// corresponds to the most significant bits for a big endian stored integer and
|
||||
+/// the least significant bits for little endian. A trunc/zext of an integer
|
||||
+/// impacts the big end of the integer. Thus, we need to add/remove elements at
|
||||
+/// the front of the vector for big endian targets, and the back of the vector
|
||||
+/// for little endian targets.
|
||||
+///
|
||||
/// Try to replace it with a shuffle (and vector/vector bitcast) if possible.
|
||||
///
|
||||
/// The source and destination vector types may have different element types.
|
||||
-static Instruction *optimizeVectorResize(Value *InVal, VectorType *DestTy,
|
||||
- InstCombiner &IC) {
|
||||
+static Instruction *optimizeVectorResizeWithIntegerBitCasts(Value *InVal,
|
||||
+ VectorType *DestTy,
|
||||
+ InstCombiner &IC) {
|
||||
// We can only do this optimization if the output is a multiple of the input
|
||||
// element size, or the input is a multiple of the output element size.
|
||||
// Convert the input type to have the same element type as the output.
|
||||
@@ -1844,31 +1857,53 @@ static Instruction *optimizeVectorResize(Value *InVal, VectorType *DestTy,
|
||||
InVal = IC.Builder.CreateBitCast(InVal, SrcTy);
|
||||
}
|
||||
|
||||
+ bool IsBigEndian = IC.getDataLayout().isBigEndian();
|
||||
+ unsigned SrcElts = SrcTy->getNumElements();
|
||||
+ unsigned DestElts = DestTy->getNumElements();
|
||||
+
|
||||
+ assert(SrcElts != DestElts && "Element counts should be different.");
|
||||
+
|
||||
// Now that the element types match, get the shuffle mask and RHS of the
|
||||
// shuffle to use, which depends on whether we're increasing or decreasing the
|
||||
// size of the input.
|
||||
- SmallVector<uint32_t, 16> ShuffleMask;
|
||||
+ SmallVector<uint32_t, 16> ShuffleMaskStorage;
|
||||
+ ArrayRef<uint32_t> ShuffleMask;
|
||||
Value *V2;
|
||||
|
||||
- if (SrcTy->getNumElements() > DestTy->getNumElements()) {
|
||||
- // If we're shrinking the number of elements, just shuffle in the low
|
||||
- // elements from the input and use undef as the second shuffle input.
|
||||
- V2 = UndefValue::get(SrcTy);
|
||||
- for (unsigned i = 0, e = DestTy->getNumElements(); i != e; ++i)
|
||||
- ShuffleMask.push_back(i);
|
||||
+ // Produce an identify shuffle mask for the src vector.
|
||||
+ ShuffleMaskStorage.resize(SrcElts);
|
||||
+ std::iota(ShuffleMaskStorage.begin(), ShuffleMaskStorage.end(), 0);
|
||||
|
||||
+ if (SrcElts > DestElts) {
|
||||
+ // If we're shrinking the number of elements (rewriting an integer
|
||||
+ // truncate), just shuffle in the elements corresponding to the least
|
||||
+ // significant bits from the input and use undef as the second shuffle
|
||||
+ // input.
|
||||
+ V2 = UndefValue::get(SrcTy);
|
||||
+ // Make sure the shuffle mask selects the "least significant bits" by
|
||||
+ // keeping elements from back of the src vector for big endian, and from the
|
||||
+ // front for little endian.
|
||||
+ ShuffleMask = ShuffleMaskStorage;
|
||||
+ if (IsBigEndian)
|
||||
+ ShuffleMask = ShuffleMask.take_back(DestElts);
|
||||
+ else
|
||||
+ ShuffleMask = ShuffleMask.take_front(DestElts);
|
||||
} else {
|
||||
- // If we're increasing the number of elements, shuffle in all of the
|
||||
- // elements from InVal and fill the rest of the result elements with zeros
|
||||
- // from a constant zero.
|
||||
+ // If we're increasing the number of elements (rewriting an integer zext),
|
||||
+ // shuffle in all of the elements from InVal. Fill the rest of the result
|
||||
+ // elements with zeros from a constant zero.
|
||||
V2 = Constant::getNullValue(SrcTy);
|
||||
- unsigned SrcElts = SrcTy->getNumElements();
|
||||
- for (unsigned i = 0, e = SrcElts; i != e; ++i)
|
||||
- ShuffleMask.push_back(i);
|
||||
-
|
||||
- // The excess elements reference the first element of the zero input.
|
||||
- for (unsigned i = 0, e = DestTy->getNumElements()-SrcElts; i != e; ++i)
|
||||
- ShuffleMask.push_back(SrcElts);
|
||||
+ // Use first elt from V2 when indicating zero in the shuffle mask.
|
||||
+ uint32_t NullElt = SrcElts;
|
||||
+ // Extend with null values in the "most significant bits" by adding elements
|
||||
+ // in front of the src vector for big endian, and at the back for little
|
||||
+ // endian.
|
||||
+ unsigned DeltaElts = DestElts - SrcElts;
|
||||
+ if (IsBigEndian)
|
||||
+ ShuffleMaskStorage.insert(ShuffleMaskStorage.begin(), DeltaElts, NullElt);
|
||||
+ else
|
||||
+ ShuffleMaskStorage.append(DeltaElts, NullElt);
|
||||
+ ShuffleMask = ShuffleMaskStorage;
|
||||
}
|
||||
|
||||
return new ShuffleVectorInst(InVal, V2,
|
||||
@@ -2359,8 +2394,8 @@ Instruction *InstCombiner::visitBitCast(BitCastInst &CI) {
|
||||
CastInst *SrcCast = cast<CastInst>(Src);
|
||||
if (BitCastInst *BCIn = dyn_cast<BitCastInst>(SrcCast->getOperand(0)))
|
||||
if (isa<VectorType>(BCIn->getOperand(0)->getType()))
|
||||
- if (Instruction *I = optimizeVectorResize(BCIn->getOperand(0),
|
||||
- cast<VectorType>(DestTy), *this))
|
||||
+ if (Instruction *I = optimizeVectorResizeWithIntegerBitCasts(
|
||||
+ BCIn->getOperand(0), cast<VectorType>(DestTy), *this))
|
||||
return I;
|
||||
}
|
||||
|
||||
diff --git a/llvm/test/Transforms/InstCombine/cast.ll b/llvm/test/Transforms/InstCombine/cast.ll
|
||||
index b6d1eda0601d..3ce8de033422 100644
|
||||
--- a/llvm/test/Transforms/InstCombine/cast.ll
|
||||
+++ b/llvm/test/Transforms/InstCombine/cast.ll
|
||||
@@ -824,7 +824,7 @@ define i64 @test59(i8 %A, i8 %B) {
|
||||
|
||||
define <3 x i32> @test60(<4 x i32> %call4) {
|
||||
; CHECK-LABEL: @test60(
|
||||
-; CHECK-NEXT: [[P10:%.*]] = shufflevector <4 x i32> [[CALL4:%.*]], <4 x i32> undef, <3 x i32> <i32 0, i32 1, i32 2>
|
||||
+; CHECK-NEXT: [[P10:%.*]] = shufflevector <4 x i32> [[CALL4:%.*]], <4 x i32> undef, <3 x i32> <i32 1, i32 2, i32 3>
|
||||
; CHECK-NEXT: ret <3 x i32> [[P10]]
|
||||
;
|
||||
%p11 = bitcast <4 x i32> %call4 to i128
|
||||
@@ -836,7 +836,7 @@ define <3 x i32> @test60(<4 x i32> %call4) {
|
||||
|
||||
define <4 x i32> @test61(<3 x i32> %call4) {
|
||||
; CHECK-LABEL: @test61(
|
||||
-; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[CALL4:%.*]], <3 x i32> <i32 0, i32 undef, i32 undef>, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
|
||||
+; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[CALL4:%.*]], <3 x i32> <i32 0, i32 undef, i32 undef>, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
|
||||
; CHECK-NEXT: ret <4 x i32> [[P10]]
|
||||
;
|
||||
%p11 = bitcast <3 x i32> %call4 to i96
|
||||
@@ -848,7 +848,7 @@ define <4 x i32> @test61(<3 x i32> %call4) {
|
||||
define <4 x i32> @test62(<3 x float> %call4) {
|
||||
; CHECK-LABEL: @test62(
|
||||
; CHECK-NEXT: [[TMP1:%.*]] = bitcast <3 x float> [[CALL4:%.*]] to <3 x i32>
|
||||
-; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[TMP1]], <3 x i32> <i32 0, i32 undef, i32 undef>, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
|
||||
+; CHECK-NEXT: [[P10:%.*]] = shufflevector <3 x i32> [[TMP1]], <3 x i32> <i32 0, i32 undef, i32 undef>, <4 x i32> <i32 3, i32 0, i32 1, i32 2>
|
||||
; CHECK-NEXT: ret <4 x i32> [[P10]]
|
||||
;
|
||||
%p11 = bitcast <3 x float> %call4 to i96
|
||||
--
|
||||
2.26.2
|
||||
|
@ -1,34 +0,0 @@
|
||||
From f0762684457a883b6813b48c98a1e94e377bc06b Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Wed, 28 Aug 2019 19:31:21 -0700
|
||||
Subject: [PATCH] Pass target to gold linker to avoid faliures on i686
|
||||
|
||||
---
|
||||
llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll | 4 ++--
|
||||
1 file changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll b/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
|
||||
index 525bf2d..01291bd 100644
|
||||
--- a/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
|
||||
+++ b/llvm/test/tools/gold/X86/linkonce_odr_unnamed_addr.ll
|
||||
@@ -3,7 +3,7 @@
|
||||
|
||||
; RUN: opt -module-summary %s -o %t.o
|
||||
; RUN: opt -module-summary %p/Inputs/linkonce_odr_unnamed_addr.ll -o %t2.o
|
||||
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
; RUN: --plugin-opt=save-temps \
|
||||
; RUN: %t.o %t2.o -o %t3.o
|
||||
; RUN: llvm-dis %t.o.1.promote.bc -o - | FileCheck %s
|
||||
@@ -11,7 +11,7 @@
|
||||
; Now test when one module is a native object. In that case we must be
|
||||
; conservative and not auto hide.
|
||||
; RUN: llc %p/Inputs/linkonce_odr_unnamed_addr.ll -o %t2native.o -filetype=obj
|
||||
-; RUN: %gold -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
+; RUN: %gold -m elf_x86_64 -plugin %llvmshlibdir/LLVMgold%shlibext \
|
||||
; RUN: --plugin-opt=save-temps \
|
||||
; RUN: %t.o %t2native.o -o %t3.o
|
||||
; RUN: llvm-dis %t.o.1.promote.bc -o - | FileCheck %s --check-prefix=NOSUMMARY
|
||||
--
|
||||
1.8.3.1
|
||||
|
@ -0,0 +1,86 @@
|
||||
From cf54ca458afff1f7827bfbbc939429a00496c4f7 Mon Sep 17 00:00:00 2001
|
||||
From: Tom Stellard <tstellar@redhat.com>
|
||||
Date: Tue, 18 Aug 2020 10:54:49 -0700
|
||||
Subject: [PATCH] [PowerPC] PPCBoolRetToInt: Skip translation if there is
|
||||
ConstantExpr
|
||||
|
||||
PPCBoolRetToInt collects PHI, Argument, Call and Constant defs related to an `i1` value which later is translated to an `i32`/`i64` value. The `translate` method expects an `i1` value. However, if the `Constant` is a `ConstantExpr`, the type of the `ConstantExpr` might not be `i1`.
|
||||
|
||||
Fixes https://bugs.llvm.org/show_bug.cgi?id=46923 which causes ICE
|
||||
```
|
||||
llvm-project/llvm/lib/IR/Constants.cpp:1924: static llvm::Constant *llvm::ConstantExpr::getZExt(llvm::Constant *, llvm::Type *, bool): Assertion `C->getType()->getScalarSizeInBits() < Ty->getScalarSizeInBits()&& "SrcTy must be smaller than DestTy for ZExt!"' failed.
|
||||
```
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D85007
|
||||
---
|
||||
llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp | 8 ++++--
|
||||
llvm/test/CodeGen/PowerPC/pr46923.ll | 31 +++++++++++++++++++++
|
||||
2 files changed, 37 insertions(+), 2 deletions(-)
|
||||
create mode 100644 llvm/test/CodeGen/PowerPC/pr46923.ll
|
||||
|
||||
diff --git a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
|
||||
index 2259a29f838..cfe3b3ce2e9 100644
|
||||
--- a/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
|
||||
+++ b/llvm/lib/Target/PowerPC/PPCBoolRetToInt.cpp
|
||||
@@ -90,6 +90,9 @@ class PPCBoolRetToInt : public FunctionPass {
|
||||
|
||||
// Translate a i1 value to an equivalent i32/i64 value:
|
||||
Value *translate(Value *V) {
|
||||
+ assert(V->getType() == Type::getInt1Ty(V->getContext()) &&
|
||||
+ "Expect an i1 value");
|
||||
+
|
||||
Type *IntTy = ST->isPPC64() ? Type::getInt64Ty(V->getContext())
|
||||
: Type::getInt32Ty(V->getContext());
|
||||
|
||||
@@ -227,8 +230,9 @@ class PPCBoolRetToInt : public FunctionPass {
|
||||
// CallInst. Potentially, bitwise operations (AND, OR, XOR, NOT) and sign
|
||||
// extension could also be handled in the future.
|
||||
for (Value *V : Defs)
|
||||
- if (!isa<PHINode>(V) && !isa<Constant>(V) &&
|
||||
- !isa<Argument>(V) && !isa<CallInst>(V))
|
||||
+ if ((!isa<PHINode>(V) && !isa<Constant>(V) && !isa<Argument>(V) &&
|
||||
+ !isa<CallInst>(V)) ||
|
||||
+ isa<ConstantExpr>(V))
|
||||
return false;
|
||||
|
||||
for (Value *V : Defs)
|
||||
diff --git a/llvm/test/CodeGen/PowerPC/pr46923.ll b/llvm/test/CodeGen/PowerPC/pr46923.ll
|
||||
new file mode 100644
|
||||
index 00000000000..d6f65508848
|
||||
--- /dev/null
|
||||
+++ b/llvm/test/CodeGen/PowerPC/pr46923.ll
|
||||
@@ -0,0 +1,31 @@
|
||||
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
|
||||
+; RUN: llc -verify-machineinstrs -mtriple=powerpc64le-unknown-unknown \
|
||||
+; RUN: -ppc-asm-full-reg-names < %s | FileCheck %s
|
||||
+
|
||||
+@bar = external constant i64, align 8
|
||||
+
|
||||
+define i1 @foo() {
|
||||
+; CHECK-LABEL: foo:
|
||||
+; CHECK: # %bb.0: # %entry
|
||||
+; CHECK-NEXT: crxor 4*cr5+lt, 4*cr5+lt, 4*cr5+lt
|
||||
+; CHECK-NEXT: li r3, 0
|
||||
+; CHECK-NEXT: li r4, 1
|
||||
+; CHECK-NEXT: isel r3, r4, r3, 4*cr5+lt
|
||||
+; CHECK-NEXT: blr
|
||||
+entry:
|
||||
+ br label %next
|
||||
+
|
||||
+next:
|
||||
+ br i1 undef, label %true, label %false
|
||||
+
|
||||
+true:
|
||||
+ br label %end
|
||||
+
|
||||
+false:
|
||||
+ br label %end
|
||||
+
|
||||
+end:
|
||||
+ %a = phi i1 [ icmp ugt (i64 0, i64 ptrtoint (i64* @bar to i64)), %true ],
|
||||
+ [ icmp ugt (i64 0, i64 2), %false ]
|
||||
+ ret i1 %a
|
||||
+}
|
||||
--
|
||||
2.18.1
|
||||
|
@ -1,113 +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
|
||||
--- a/llvm/lib/Analysis/ScalarEvolution.cpp
|
||||
+++ b/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
|
||||
--- a/llvm/test/Analysis/ScalarEvolution/limit-depth.ll
|
||||
+++ b/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
|
||||
--- a/llvm/test/Analysis/ScalarEvolution/nsw.ll
|
||||
+++ b/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
|
||||
--- a/llvm/test/Analysis/ScalarEvolution/trip-count12.ll
|
||||
+++ b/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
|
||||
--- a/llvm/test/Analysis/ScalarEvolution/trip-count9.ll
|
||||
+++ b/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:
|
||||
--
|
||||
2.24.1
|
||||
|
@ -1,248 +0,0 @@
|
||||
From e4e77bb8bf741f52b43b90987646f1c118914848 Mon Sep 17 00:00:00 2001
|
||||
From: Jordan Rupprecht <rupprecht@google.com>
|
||||
Date: Wed, 21 Aug 2019 18:00:17 +0000
|
||||
Subject: [PATCH] [docs] Convert remaining command guide entries from md to
|
||||
rst.
|
||||
|
||||
Summary:
|
||||
Linking between markdown and rst files is currently not supported very well, e.g. the current llvm-addr2line docs [1] link to "llvm-symbolizer" instead of "llvm-symbolizer.html". This is weirdly broken in different ways depending on which versions of sphinx and recommonmark are being used, so workaround the bug by using rst everywhere.
|
||||
|
||||
[1] http://llvm.org/docs/CommandGuide/llvm-addr2line.html
|
||||
|
||||
Reviewers: jhenderson
|
||||
|
||||
Reviewed By: jhenderson
|
||||
|
||||
Subscribers: lebedev.ri, llvm-commits
|
||||
|
||||
Tags: #llvm
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D66305
|
||||
|
||||
llvm-svn: 369553
|
||||
---
|
||||
llvm/docs/CommandGuide/llvm-addr2line.md | 28 -----------------------
|
||||
llvm/docs/CommandGuide/llvm-addr2line.rst | 38 +++++++++++++++++++++++++++++++
|
||||
llvm/docs/CommandGuide/llvm-ranlib.md | 17 --------------
|
||||
llvm/docs/CommandGuide/llvm-ranlib.rst | 23 +++++++++++++++++++
|
||||
llvm/docs/CommandGuide/llvm-size.md | 10 --------
|
||||
llvm/docs/CommandGuide/llvm-size.rst | 15 ++++++++++++
|
||||
llvm/docs/CommandGuide/llvm-strings.md | 10 --------
|
||||
llvm/docs/CommandGuide/llvm-strings.rst | 15 ++++++++++++
|
||||
8 files changed, 91 insertions(+), 65 deletions(-)
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-addr2line.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-addr2line.rst
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-ranlib.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-ranlib.rst
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-size.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-size.rst
|
||||
delete mode 100644 llvm/docs/CommandGuide/llvm-strings.md
|
||||
create mode 100644 llvm/docs/CommandGuide/llvm-strings.rst
|
||||
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-addr2line.md b/llvm/docs/CommandGuide/llvm-addr2line.md
|
||||
deleted file mode 100644
|
||||
index 03224c4..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-addr2line.md
|
||||
+++ /dev/null
|
||||
@@ -1,28 +0,0 @@
|
||||
-# llvm-addr2line - a drop-in replacement for addr2line
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-addr2line** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-addr2line** is an alias for the [llvm-symbolizer](llvm-symbolizer) tool
|
||||
-with different defaults. The goal is to make it a drop-in replacement for
|
||||
-GNU's **addr2line**.
|
||||
-
|
||||
-Here are some of those differences:
|
||||
-
|
||||
-* Defaults not to print function names. Use [-f](llvm-symbolizer-opt-f)
|
||||
- to enable that.
|
||||
-
|
||||
-* Defaults not to demangle function names. Use [-C](llvm-symbolizer-opt-C)
|
||||
- to switch the demangling on.
|
||||
-
|
||||
-* Defaults not to print inlined frames. Use [-i](llvm-symbolizer-opt-i)
|
||||
- to show inlined frames for a source code location in an inlined function.
|
||||
-
|
||||
-* Uses [--output-style=GNU](llvm-symbolizer-opt-output-style) by default.
|
||||
-
|
||||
-## SEE ALSO
|
||||
-
|
||||
-Refer to [llvm-symbolizer](llvm-symbolizer) for additional information.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-addr2line.rst b/llvm/docs/CommandGuide/llvm-addr2line.rst
|
||||
new file mode 100644
|
||||
index 0000000..08f1b69
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-addr2line.rst
|
||||
@@ -0,0 +1,38 @@
|
||||
+llvm-addr2line - a drop-in replacement for addr2line
|
||||
+====================================================
|
||||
+
|
||||
+.. program:: llvm-addr2line
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-addr2line` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-addr2line` is an alias for the :manpage:`llvm-symbolizer(1)`
|
||||
+tool with different defaults. The goal is to make it a drop-in replacement for
|
||||
+GNU's :program:`addr2line`.
|
||||
+
|
||||
+Here are some of those differences:
|
||||
+
|
||||
+- Defaults not to print function names. Use `-f`_ to enable that.
|
||||
+
|
||||
+- Defaults not to demangle function names. Use `-C`_ to switch the
|
||||
+ demangling on.
|
||||
+
|
||||
+- Defaults not to print inlined frames. Use `-i`_ to show inlined
|
||||
+ frames for a source code location in an inlined function.
|
||||
+
|
||||
+- Uses `--output-style=GNU`_ by default.
|
||||
+
|
||||
+SEE ALSO
|
||||
+--------
|
||||
+
|
||||
+:manpage:`llvm-symbolizer(1)`
|
||||
+
|
||||
+.. _-f: llvm-symbolizer.html#llvm-symbolizer-opt-f
|
||||
+.. _-C: llvm-symbolizer.html#llvm-symbolizer-opt-c
|
||||
+.. _-i: llvm-symbolizer.html#llvm-symbolizer-opt-i
|
||||
+.. _--output-style=GNU: llvm-symbolizer.html#llvm-symbolizer-opt-output-style
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-ranlib.md b/llvm/docs/CommandGuide/llvm-ranlib.md
|
||||
deleted file mode 100644
|
||||
index 4377364..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-ranlib.md
|
||||
+++ /dev/null
|
||||
@@ -1,17 +0,0 @@
|
||||
-# llvm-ranlib - generates an archive index
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-ranlib** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-ranlib** is an alias for the [llvm-ar](llvm-ar.html) tool that generates
|
||||
-an index for an archive. It can be used as a replacement for GNU's **ranlib**
|
||||
-tool.
|
||||
-
|
||||
-Running **llvm-ranlib** is equivalent to running **llvm-ar s**.
|
||||
-
|
||||
-## SEE ALSO
|
||||
-
|
||||
-Refer to [llvm-ar](llvm-ar.html) for additional information.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-ranlib.rst b/llvm/docs/CommandGuide/llvm-ranlib.rst
|
||||
new file mode 100644
|
||||
index 0000000..314a330
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-ranlib.rst
|
||||
@@ -0,0 +1,23 @@
|
||||
+llvm-ranlib - generates an archive index
|
||||
+========================================
|
||||
+
|
||||
+.. program:: llvm-ranlib
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-ranlib` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-ranlib` is an alias for the :doc:`llvm-ar <llvm-ar>` tool that
|
||||
+generates an index for an archive. It can be used as a replacement for GNU’s
|
||||
+:program:`ranlib` tool.
|
||||
+
|
||||
+Running :program:`llvm-ranlib` is equivalent to running ``llvm-ar s``.
|
||||
+
|
||||
+SEE ALSO
|
||||
+--------
|
||||
+
|
||||
+:manpage:`llvm-ar(1)`
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-size.md b/llvm/docs/CommandGuide/llvm-size.md
|
||||
deleted file mode 100644
|
||||
index 3952708..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-size.md
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-# llvm-size - print segment sizes
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-size** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-size** is a tool that prints segment sizes in object files. The goal is
|
||||
-to make it a drop-in replacement for GNU's **size**.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-size.rst b/llvm/docs/CommandGuide/llvm-size.rst
|
||||
new file mode 100644
|
||||
index 0000000..0dce15c
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-size.rst
|
||||
@@ -0,0 +1,15 @@
|
||||
+llvm-size - print size information
|
||||
+==================================
|
||||
+
|
||||
+.. program:: llvm-size
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-size` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-size` is a tool that prints size information for object files.
|
||||
+The goal is to make it a drop-in replacement for GNU’s :program:`size`.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strings.md b/llvm/docs/CommandGuide/llvm-strings.md
|
||||
deleted file mode 100644
|
||||
index b5871c4..0000000
|
||||
--- a/llvm/docs/CommandGuide/llvm-strings.md
|
||||
+++ /dev/null
|
||||
@@ -1,10 +0,0 @@
|
||||
-# llvm-strings - print strings
|
||||
-
|
||||
-## SYNOPSIS
|
||||
-
|
||||
-**llvm-strings** [*options*]
|
||||
-
|
||||
-## DESCRIPTION
|
||||
-
|
||||
-**llvm-strings** is a tool that prints strings in object files. The goal is to
|
||||
-make it a drop-in replacement for GNU's **size**.
|
||||
diff --git a/llvm/docs/CommandGuide/llvm-strings.rst b/llvm/docs/CommandGuide/llvm-strings.rst
|
||||
new file mode 100644
|
||||
index 0000000..d8ab9cb
|
||||
--- /dev/null
|
||||
+++ b/llvm/docs/CommandGuide/llvm-strings.rst
|
||||
@@ -0,0 +1,15 @@
|
||||
+llvm-strings - print strings
|
||||
+============================
|
||||
+
|
||||
+.. program:: llvm-strings
|
||||
+
|
||||
+SYNOPSIS
|
||||
+--------
|
||||
+
|
||||
+:program:`llvm-strings` [*options*]
|
||||
+
|
||||
+DESCRIPTION
|
||||
+-----------
|
||||
+
|
||||
+:program:`llvm-strings` is a tool that prints strings in files. The goal is to
|
||||
+make it a drop-in replacement for GNU’s :program:`strings`.
|
||||
--
|
||||
1.8.3.1
|
||||
|
23
SOURCES/bab5908df544680ada0a3cf431f55aeccfbdb321.patch
Normal file
23
SOURCES/bab5908df544680ada0a3cf431f55aeccfbdb321.patch
Normal file
@ -0,0 +1,23 @@
|
||||
From bab5908df544680ada0a3cf431f55aeccfbdb321 Mon Sep 17 00:00:00 2001
|
||||
From: serge-sans-paille <sguelton@redhat.com>
|
||||
Date: Mon, 13 Apr 2020 13:44:15 +0200
|
||||
Subject: [PATCH] Normalize working directory when running llvm-mc in test
|
||||
|
||||
Otherwise, depending on the lit location used to run the test, llvm-mc adds an
|
||||
include_directories entry in the dwarf output, which breaks tests in some setup.
|
||||
|
||||
Differential Revision: https://reviews.llvm.org/D77876
|
||||
---
|
||||
llvm/test/MC/MachO/gen-dwarf.s | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/llvm/test/MC/MachO/gen-dwarf.s b/llvm/test/MC/MachO/gen-dwarf.s
|
||||
index 0813856d625f..6d39d278e818 100644
|
||||
--- a/llvm/test/MC/MachO/gen-dwarf.s
|
||||
+++ b/llvm/test/MC/MachO/gen-dwarf.s
|
||||
@@ -1,4 +1,4 @@
|
||||
-// RUN: llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
|
||||
+// RUN: mkdir -p %t0 && cd %t0 && llvm-mc -g -triple i386-apple-darwin10 %s -filetype=obj -o %t
|
||||
// RUN: llvm-dwarfdump -all %t | FileCheck %s
|
||||
|
||||
.globl _bar
|
7
SOURCES/hans-gpg-key.asc
Normal file
7
SOURCES/hans-gpg-key.asc
Normal file
@ -0,0 +1,7 @@
|
||||
<html>
|
||||
<head><title>404 Not Found</title></head>
|
||||
<body bgcolor="white">
|
||||
<center><h1>404 Not Found</h1></center>
|
||||
<hr><center>nginx/1.4.6 (Ubuntu)</center>
|
||||
</body>
|
||||
</html>
|
BIN
SOURCES/llvm-10.0.1.src.tar.xz.sig
Normal file
BIN
SOURCES/llvm-10.0.1.src.tar.xz.sig
Normal file
Binary file not shown.
@ -49,16 +49,10 @@ esac
|
||||
cd $(mktemp -d)
|
||||
ln -s /usr/include include
|
||||
tar -xzf /usr/share/llvm/src/test.tar.gz
|
||||
ln -s $ARCH.site.cfg.py test/lit.site.cfg.py
|
||||
ln -s $ARCH.site.cfg.py test/Unit/lit.site.cfg.py
|
||||
|
||||
# llvm_obj_root is used to determine the directory the tests will run in.
|
||||
# test/MC/MachO/gen-dwarf.s fails if llvm_obj_root is a parent directory
|
||||
# of the source file. To workaround this, we set llvm_obj_root to a
|
||||
# different directory than the one used to store the test sources.
|
||||
# This also matches better how tests are run from the llvm source tree.
|
||||
ln -s /usr/share/llvm/src/$ARCH.site.cfg.py test/lit.site.cfg.py
|
||||
ln -s /usr/share/llvm/src/$ARCH.Unit.site.cfg.py test/Unit/lit.site.cfg.py
|
||||
lit -v -s $threads_arg test \
|
||||
-Dllvm_obj_root=$(mktemp -d) \
|
||||
-Dllvm_obj_root=`pwd` \
|
||||
-Dllvm_test_root=`pwd`/test \
|
||||
-Dllvm_unittest_bindir=$LIB_DIR/llvm \
|
||||
-Dllvm_shlib_dir=$LIB_DIR
|
||||
|
@ -10,12 +10,12 @@
|
||||
|
||||
%global llvm_libdir %{_libdir}/%{name}
|
||||
%global build_llvm_libdir %{buildroot}%{llvm_libdir}
|
||||
%global maj_ver 9
|
||||
#%%global rc_ver 6
|
||||
%global baserelease 3
|
||||
%global llvm_srcdir llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src
|
||||
%global maj_ver 10
|
||||
%global min_ver 0
|
||||
%global patch_ver 1
|
||||
#%%global rc_ver 3
|
||||
%global baserelease 5
|
||||
|
||||
|
||||
%if %{with compat_build}
|
||||
%global pkg_name llvm%{maj_ver}.%{min_ver}
|
||||
@ -50,34 +50,36 @@ Summary: The Low Level Virtual Machine
|
||||
|
||||
License: NCSA
|
||||
URL: http://llvm.org
|
||||
Source0: http://%{?rc_ver:pre}releases.llvm.org/%{version}/%{?rc_ver:rc%{rc_ver}}/llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src.tar.xz
|
||||
%if 0%{?rc_ver:1}
|
||||
Source0: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{llvm_srcdir}.tar.xz
|
||||
Source3: https://prereleases.llvm.org/%{version}/rc%{rc_ver}/%{llvm_srcdir}.tar.xz.sig
|
||||
%else
|
||||
Source0: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{llvm_srcdir}.tar.xz
|
||||
Source3: https://github.com/llvm/llvm-project/releases/download/llvmorg-%{version}/%{llvm_srcdir}.tar.xz.sig
|
||||
%endif
|
||||
%if %{without compat_build}
|
||||
Source1: run-lit-tests
|
||||
Source2: lit.fedora.cfg.py
|
||||
%endif
|
||||
Source4: https://prereleases.llvm.org/%{version}/hans-gpg-key.asc
|
||||
|
||||
Patch0: 0001-Filter-out-cxxflags-not-supported-by-clang.patch
|
||||
# TODO: I'm not sure why this is needed. Could be a change in newer version
|
||||
# of gold.
|
||||
Patch1: 0001-Pass-target-to-gold-linker-to-avoid-faliures-on-i686.patch
|
||||
##Patch0: 0001-Filter-out-cxxflags-not-supported-by-clang.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: bab5908df544680ada0a3cf431f55aeccfbdb321.patch
|
||||
Patch5: 0001-PowerPC-PPCBoolRetToInt-Skip-translation-if-there-is.patch
|
||||
|
||||
# RHEL-specific patches.
|
||||
Patch101: 0001-Deactivate-markdown-doc.patch
|
||||
# Patches to convert md files to rst since we don't have the md parser in RHEL.
|
||||
Patch102: 0001-Docs-llvm-strip-Add-help-text-to-llvm-strip-rst-doc.patch
|
||||
Patch103: 0001-docs-Convert-remaining-command-guide-entries-from-md.patch
|
||||
|
||||
# Fix crash in kernel bpf self-tests
|
||||
Patch5: 0001-BPF-Handling-type-conversions-correctly-for-CO-RE.patch
|
||||
Patch6: 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch
|
||||
|
||||
# Fix Rust codegen bug, https://github.com/rust-lang/rust/issues/69225
|
||||
Patch7: 0001-Revert-SCEV-add-no-wrap-flag-for-SCEVAddExpr.patch
|
||||
|
||||
# Fix big-endian miscompilation in rustc, rhbz#1837660
|
||||
Patch8: 0001-InstCombine-Fix-big-endian-miscompile-of-bitcast-zex.patch
|
||||
#Patch102: 0001-Docs-llvm-strip-Add-help-text-to-llvm-strip-rst-doc.patch
|
||||
#Patch103: 0001-docs-Convert-remaining-command-guide-entries-from-md.patch
|
||||
### Fix crash in kernel bpf self-tests
|
||||
##Patch5: 0001-BPF-Handling-type-conversions-correctly-for-CO-RE.patch
|
||||
##Patch6: 0001-BPF-annotate-DIType-metadata-for-builtin-preseve_arr.patch
|
||||
##
|
||||
### Fix Rust codegen bug, https://github.com/rust-lang/rust/issues/69225
|
||||
##Patch7: 0001-Revert-SCEV-add-no-wrap-flag-for-SCEVAddExpr.patch
|
||||
|
||||
BuildRequires: gcc
|
||||
BuildRequires: gcc-c++
|
||||
@ -89,6 +91,8 @@ BuildRequires: ncurses-devel
|
||||
BuildRequires: python3-sphinx
|
||||
%if !0%{?rhel}
|
||||
BuildRequires: python3-recommonmark
|
||||
%else
|
||||
BuildRequires: pandoc
|
||||
%endif
|
||||
BuildRequires: multilib-rpm-config
|
||||
%if %{with gold}
|
||||
@ -184,12 +188,16 @@ LLVM's modified googletest sources.
|
||||
%endif
|
||||
|
||||
%prep
|
||||
%autosetup -n llvm-%{version}%{?rc_ver:rc%{rc_ver}}.src -p2
|
||||
%autosetup -n %{llvm_srcdir} -p2
|
||||
|
||||
pathfix.py -i %{__python3} -pn \
|
||||
test/BugPoint/compile-custom.ll.py \
|
||||
tools/opt-viewer/*.py
|
||||
|
||||
# Convert markdown files to rst to cope with the absence of recommonmark in rhel.
|
||||
# The sed expression takes care of a slight difference between pandoc markdown and sphinx markdown.
|
||||
find -name '*.md' | while read md; do sed -r -e 's/^( )*\* /\n\1\* /' ${md} | pandoc -f markdown -o ${md%.md}.rst ; done
|
||||
|
||||
%build
|
||||
mkdir -p _build
|
||||
cd _build
|
||||
@ -263,6 +271,7 @@ cd _build
|
||||
-DLLVM_INSTALL_TOOLCHAIN_ONLY:BOOL=OFF \
|
||||
\
|
||||
-DSPHINX_WARNINGS_AS_ERRORS=OFF \
|
||||
-DCMAKE_INSTALL_PREFIX=%{install_prefix} \
|
||||
-DLLVM_INSTALL_SPHINX_HTML_DIR=%{_pkgdocdir}/html \
|
||||
-DSPHINX_EXECUTABLE=%{_bindir}/sphinx-build-3
|
||||
|
||||
@ -280,6 +289,9 @@ cd _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
|
||||
ln -s llvm-config.1 %{buildroot}%{_mandir}/man1/llvm-config-%{__isa_bits}.1
|
||||
mv %{buildroot}%{_mandir}/man1/tblgen.1 %{buildroot}%{_mandir}/man1/llvm-tblgen.1
|
||||
@ -292,6 +304,8 @@ do
|
||||
install -m 0755 ./_build/bin/$f %{buildroot}%{_bindir}
|
||||
done
|
||||
|
||||
# Remove testing of update utility tools
|
||||
rm -rf test/tools/UpdateTestChecks
|
||||
|
||||
%multilib_fix_c_header --file %{_includedir}/llvm/Config/llvm-config.h
|
||||
|
||||
@ -333,7 +347,12 @@ install -m 0755 %{SOURCE1} %{buildroot}%{_libexecdir}/tests/llvm
|
||||
# Install lit tests. We need to put these in a tarball otherwise rpm will complain
|
||||
# about some of the test inputs having the wrong object file format.
|
||||
install -d %{buildroot}%{_datadir}/llvm/
|
||||
tar -czf %{install_srcdir}/test.tar.gz test/
|
||||
|
||||
# The various tar options are there to make sur the archive is the same on 32 and 64 bit arch, i.e.
|
||||
# the archive creation is reproducible. Move arch-specific content out of the tarball
|
||||
mv %{lit_cfg} %{install_srcdir}/%{_arch}.site.cfg.py
|
||||
mv %{lit_unit_cfg} %{install_srcdir}/%{_arch}.Unit.site.cfg.py
|
||||
tar --sort=name --mtime='UTC 2020-01-01' -c test/ | gzip -n > %{install_srcdir}/test.tar.gz
|
||||
|
||||
# Install the unit test binaries
|
||||
mkdir -p %{build_llvm_libdir}
|
||||
@ -355,7 +374,7 @@ cp -R unittests/DebugInfo/PDB/Inputs %{buildroot}%{_datadir}/llvm/src/unittests/
|
||||
mkdir -p %{buildroot}/%{_bindir}
|
||||
for f in %{buildroot}/%{install_bindir}/*; do
|
||||
filename=`basename $f`
|
||||
ln -s %{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
||||
ln -s ../../../%{install_bindir}/$filename %{buildroot}/%{_bindir}/$filename%{exec_suffix}
|
||||
done
|
||||
|
||||
# Move header files
|
||||
@ -375,7 +394,7 @@ EOF
|
||||
|
||||
# Add version suffix to man pages and move them to mandir.
|
||||
mkdir -p %{buildroot}/%{_mandir}/man1
|
||||
for f in `ls %{build_install_prefix}/share/man/man1/*`; do
|
||||
for f in %{build_install_prefix}/share/man/man1/*; do
|
||||
filename=`basename $f | cut -f 1 -d '.'`
|
||||
mv $f %{buildroot}%{_mandir}/man1/$filename%{exec_suffix}.1
|
||||
done
|
||||
@ -404,7 +423,7 @@ ninja check-all -C _build || \
|
||||
|
||||
%postun devel
|
||||
if [ $1 -eq 0 ]; then
|
||||
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config
|
||||
%{_sbindir}/update-alternatives --remove llvm-config %{_bindir}/llvm-config-%{__isa_bits}
|
||||
fi
|
||||
|
||||
%endif
|
||||
@ -415,6 +434,7 @@ fi
|
||||
%{_bindir}/*
|
||||
|
||||
%if %{without compat_build}
|
||||
%exclude %{_bindir}/llvm-config
|
||||
%exclude %{_bindir}/llvm-config-%{__isa_bits}
|
||||
%exclude %{_bindir}/not
|
||||
%exclude %{_bindir}/count
|
||||
@ -449,6 +469,7 @@ fi
|
||||
|
||||
%files devel
|
||||
%if %{without compat_build}
|
||||
%ghost %{_bindir}/llvm-config
|
||||
%{_bindir}/llvm-config-%{__isa_bits}
|
||||
%{_mandir}/man1/llvm-config*
|
||||
%{_includedir}/llvm
|
||||
@ -489,6 +510,8 @@ fi
|
||||
%{llvm_libdir}/unittests/
|
||||
%{_datadir}/llvm/src/unittests
|
||||
%{_datadir}/llvm/src/test.tar.gz
|
||||
%{_datadir}/llvm/src/%{_arch}.site.cfg.py
|
||||
%{_datadir}/llvm/src/%{_arch}.Unit.site.cfg.py
|
||||
%{_datadir}/llvm/lit.fedora.cfg.py
|
||||
%{_bindir}/not
|
||||
%{_bindir}/count
|
||||
@ -507,8 +530,20 @@ fi
|
||||
%endif
|
||||
|
||||
%changelog
|
||||
* Tue May 26 2020 Josh Stone <jistone@redhat.com> - 9.0.1-5
|
||||
- Fix big-endian miscompilation in rustc, rhbz#1840304
|
||||
* Wed Aug 19 2020 Tom Stellard <tstellar@redhat.com> - 10.0.1-3
|
||||
- Fix rust crash on ppc64le compiling firefox
|
||||
|
||||
* Fri Jul 31 2020 sguelton@redhat.com - 10.0.1-2
|
||||
- Fix llvm-config alternative handling, see rhbz#1859996
|
||||
|
||||
* Fri Jul 24 2020 sguelton@redhat.com - 10.0.1-1
|
||||
- 10.0.1 Release
|
||||
|
||||
* Wed Jun 24 2020 sguelton@redhat.com - 10.0.0-2
|
||||
- Reproducible build of test.tar.gz, see rhbz#1820319
|
||||
|
||||
* Tue Apr 7 2020 sguelton@redhat.com - 10.0.0-1
|
||||
- 10.0.0 Release
|
||||
|
||||
* Thu Feb 27 2020 Josh Stone <jistone@redhat.com> - 9.0.1-4
|
||||
- Fix a codegen bug for Rust
|
||||
|
Loading…
Reference in New Issue
Block a user