Compare commits

...

9 Commits
master ... f27

Author SHA1 Message Date
Tom Stellard 6114ffe50f 5.0.2 Release 2018-05-04 04:23:03 +00:00
Tom Stellard 6640c739a1 Re-enable arm tests that used to hang 2018-03-27 23:06:42 +00:00
Tom Stellard a04eb20439 Backport r327651 from trunk rhbz#1554349 2018-03-20 03:36:11 +00:00
Tom Stellard 2653f0039c Backport more retpoline patches 2018-03-07 14:52:16 +00:00
Tom Stellard 64558d28cf Backport retpoline support 2018-02-06 04:57:28 +00:00
Tom Stellard 7a0f3d9fb9 Backport r315279 to fix an issue with rust 2018-02-01 20:41:11 +00:00
Tom Stellard eaeb4a01bc 5.0.1 Release 2018-01-17 00:29:00 +00:00
Tom Stellard c2e80ad87a Merge branch 'master' into f27 2017-12-05 01:04:11 +00:00
Tom Stellard 2839cf60b0 Backport r318289 to fix a debuginfo issue with rust. 2017-11-22 00:46:10 +00:00
8 changed files with 325 additions and 170 deletions

2
.gitignore vendored
View File

@ -33,3 +33,5 @@
/llvm-4.0.0.src.tar.xz
/llvm-4.0.1.src.tar.xz
/llvm-5.0.0.src.tar.xz
/llvm-5.0.1.src.tar.xz
/llvm-5.0.2.src.tar.xz

View File

@ -0,0 +1,105 @@
From 9848d812bc6a5ecbac4b64b28d580f5f5ce16c4f Mon Sep 17 00:00:00 2001
From: Bjorn Steinbrink <bsteinbr@gmail.com>
Date: Tue, 10 Oct 2017 07:46:17 +0000
Subject: [PATCH 1/2] Ignore all duplicate frame index expression
Some passes might duplicate calls to llvm.dbg.declare creating
duplicate frame index expression which currently trigger an assertion
which is meant to catch erroneous, overlapping fragment declarations.
But identical frame index expressions are just redundant and don't
actually conflict with each other, so we can be more lenient and just
ignore the duplicates.
Reviewers: aprantl, rnk
Subscribers: llvm-commits, JDevlieghere
Differential Revision: https://reviews.llvm.org/D38540
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315279 91177308-0d34-0410-b5e6-96231b3b80d8
Conflicts:
lib/CodeGen/AsmPrinter/DwarfDebug.h
---
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 25 +++++++++++++++++++++++++
lib/CodeGen/AsmPrinter/DwarfDebug.h | 25 +------------------------
2 files changed, 26 insertions(+), 24 deletions(-)
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index f1b4d9f..90f6f2f 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -206,9 +206,34 @@ ArrayRef<DbgVariable::FrameIndexExpr> DbgVariable::getFrameIndexExprs() const {
return A.Expr->getFragmentInfo()->OffsetInBits <
B.Expr->getFragmentInfo()->OffsetInBits;
});
+
return FrameIndexExprs;
}
+void DbgVariable::addMMIEntry(const DbgVariable &V) {
+ assert(DebugLocListIndex == ~0U && !MInsn && "not an MMI entry");
+ assert(V.DebugLocListIndex == ~0U && !V.MInsn && "not an MMI entry");
+ assert(V.Var == Var && "conflicting variable");
+ assert(V.IA == IA && "conflicting inlined-at location");
+
+ assert(!FrameIndexExprs.empty() && "Expected an MMI entry");
+ assert(!V.FrameIndexExprs.empty() && "Expected an MMI entry");
+
+ for (const auto &FIE : V.FrameIndexExprs)
+ // Ignore duplicate entries.
+ if (llvm::none_of(FrameIndexExprs, [&](const FrameIndexExpr &Other) {
+ return FIE.FI == Other.FI && FIE.Expr == Other.Expr;
+ }))
+ FrameIndexExprs.push_back(FIE);
+
+ assert((FrameIndexExprs.size() == 1 ||
+ llvm::all_of(FrameIndexExprs,
+ [](FrameIndexExpr &FIE) {
+ return FIE.Expr && FIE.Expr->isFragment();
+ })) &&
+ "conflicting locations for variable");
+}
+
static const DwarfAccelTable::Atom TypeAtoms[] = {
DwarfAccelTable::Atom(dwarf::DW_ATOM_die_offset, dwarf::DW_FORM_data4),
DwarfAccelTable::Atom(dwarf::DW_ATOM_die_tag, dwarf::DW_FORM_data2),
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 78ee9a1..44107aa 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -124,30 +124,7 @@ public:
/// Get the FI entries, sorted by fragment offset.
ArrayRef<FrameIndexExpr> getFrameIndexExprs() const;
bool hasFrameIndexExprs() const { return !FrameIndexExprs.empty(); }
-
- void addMMIEntry(const DbgVariable &V) {
- assert(DebugLocListIndex == ~0U && !MInsn && "not an MMI entry");
- assert(V.DebugLocListIndex == ~0U && !V.MInsn && "not an MMI entry");
- assert(V.Var == Var && "conflicting variable");
- assert(V.IA == IA && "conflicting inlined-at location");
-
- assert(!FrameIndexExprs.empty() && "Expected an MMI entry");
- assert(!V.FrameIndexExprs.empty() && "Expected an MMI entry");
-
- if (FrameIndexExprs.size()) {
- auto *Expr = FrameIndexExprs.back().Expr;
- // Get rid of duplicate non-fragment entries. More than one non-fragment
- // dbg.declare makes no sense so ignore all but the first.
- if (!Expr || !Expr->isFragment())
- return;
- }
- FrameIndexExprs.append(V.FrameIndexExprs.begin(), V.FrameIndexExprs.end());
- assert(all_of(FrameIndexExprs,
- [](FrameIndexExpr &FIE) {
- return FIE.Expr && FIE.Expr->isFragment();
- }) &&
- "conflicting locations for variable");
- }
+ void addMMIEntry(const DbgVariable &V);
// Translate tag to proper Dwarf tag.
dwarf::Tag getTag() const {
--
1.8.3.1

View File

@ -1,157 +0,0 @@
From d61468959556ddc180c6c28edff476244fd0e8a6 Mon Sep 17 00:00:00 2001
From: tstellar <tstellar@91177308-0d34-0410-b5e6-96231b3b80d8>
Date: Fri, 17 Nov 2017 18:48:34 +0000
Subject: [PATCH] Merging r318289:
------------------------------------------------------------------------
r318289 | jdevlieghere | 2017-11-15 02:57:05 -0800 (Wed, 15 Nov 2017) | 14 lines
[DebugInfo] Fix potential CU mismatch for SubprogramScopeDIEs.
In constructAbstractSubprogramScopeDIE there can be a potential mismatch
between `this` and the CU of ContextDIE when a scope is shared between
two DISubprograms belonging to a different CU. In that case, `this` is
the CU that was specified in the IR, but the CU of ContextDIE is that of
the first subprogram that was emitted. This patch fixes the mismatch by
looking up the CU of ContextDIE, and switching to use that.
This fixes PR35212 (https://bugs.llvm.org/show_bug.cgi?id=35212)
Patch by Philip Craig!
Differential revision: https://reviews.llvm.org/D39981
------------------------------------------------------------------------
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_50@318542 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp | 20 ++++++++----
lib/CodeGen/AsmPrinter/DwarfDebug.h | 5 ++-
test/DebugInfo/cross-cu-scope.ll | 50 +++++++++++++++++++++++++++++
3 files changed, 67 insertions(+), 8 deletions(-)
create mode 100644 test/DebugInfo/cross-cu-scope.ll
diff --git a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
index 676c48f..333d14a 100644
--- a/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfCompileUnit.cpp
@@ -621,6 +621,7 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
auto *SP = cast<DISubprogram>(Scope->getScopeNode());
DIE *ContextDIE;
+ DwarfCompileUnit *ContextCU = this;
if (includeMinimalInlineScopes())
ContextDIE = &getUnitDie();
@@ -631,18 +632,23 @@ void DwarfCompileUnit::constructAbstractSubprogramScopeDIE(
else if (auto *SPDecl = SP->getDeclaration()) {
ContextDIE = &getUnitDie();
getOrCreateSubprogramDIE(SPDecl);
- } else
+ } else {
ContextDIE = getOrCreateContextDIE(resolve(SP->getScope()));
+ // The scope may be shared with a subprogram that has already been
+ // constructed in another CU, in which case we need to construct this
+ // subprogram in the same CU.
+ ContextCU = DD->lookupCU(ContextDIE->getUnitDie());
+ }
// Passing null as the associated node because the abstract definition
// shouldn't be found by lookup.
- AbsDef = &createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr);
- applySubprogramAttributesToDefinition(SP, *AbsDef);
+ AbsDef = &ContextCU->createAndAddDIE(dwarf::DW_TAG_subprogram, *ContextDIE, nullptr);
+ ContextCU->applySubprogramAttributesToDefinition(SP, *AbsDef);
- if (!includeMinimalInlineScopes())
- addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
- if (DIE *ObjectPointer = createAndAddScopeChildren(Scope, *AbsDef))
- addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
+ if (!ContextCU->includeMinimalInlineScopes())
+ ContextCU->addUInt(*AbsDef, dwarf::DW_AT_inline, None, dwarf::DW_INL_inlined);
+ if (DIE *ObjectPointer = ContextCU->createAndAddScopeChildren(Scope, *AbsDef))
+ ContextCU->addDIEEntry(*AbsDef, dwarf::DW_AT_object_pointer, *ObjectPointer);
}
DIE *DwarfCompileUnit::constructImportedEntityDIE(
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.h b/lib/CodeGen/AsmPrinter/DwarfDebug.h
index 5dfe06c..78ee9a1 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.h
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.h
@@ -283,7 +283,7 @@ class DwarfDebug : public DebugHandlerBase {
// 0, referencing the comp_dir of all the type units that use it.
MCDwarfDwoLineTable SplitTypeUnitFileTable;
/// @}
-
+
/// True iff there are multiple CUs in this module.
bool SingleCU;
bool IsDarwin;
@@ -562,6 +562,9 @@ public:
bool isLexicalScopeDIENull(LexicalScope *Scope);
bool hasDwarfPubSections(bool includeMinimalInlineScopes) const;
+
+ /// Find the matching DwarfCompileUnit for the given CU DIE.
+ DwarfCompileUnit *lookupCU(const DIE *Die) { return CUDieMap.lookup(Die); }
};
} // End of namespace llvm
diff --git a/test/DebugInfo/cross-cu-scope.ll b/test/DebugInfo/cross-cu-scope.ll
new file mode 100644
index 0000000..7c71f27
--- /dev/null
+++ b/test/DebugInfo/cross-cu-scope.ll
@@ -0,0 +1,50 @@
+; RUN: %llc_dwarf %s -filetype=obj -o %t
+; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
+
+; Reduced test case from PR35212. Two DISubprogram belong to a different CU but
+; share a scope. Both are declarations and end up in the scope's CU. We want to
+; check that the CU from the context DIE is used (rather than from the IR).
+; This manifests itself by the DW_base_type ending up in the second CU, rather
+; than in the first one as specified in the IR.
+
+; CHECK: DW_TAG_compile_unit
+; CHECK-NEXT: discriminator 0
+; CHECK: DW_TAG_compile_unit
+; CHECK-NEXT: discriminator 1
+; CHECK: DW_TAG_structure_type
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_subprogram
+; CHECK-NOT: NULL
+; CHECK: DW_TAG_formal_parameter
+; CHECK-NOT: NULL
+; CHECK: DW_AT_type{{.*}}{[[USIZE_LABEL:0x[0-9a-f]+]]}
+; CHECK: NULL
+; CHECK: [[USIZE_LABEL]]: DW_TAG_base_type
+; CHECK-NOT: NULL
+; CHECK: DW_AT_name{{.*}}"usize"
+
+define hidden void @foo() !dbg !4 {
+ ret void, !dbg !7
+}
+
+!llvm.dbg.cu = !{!0, !2}
+!llvm.module.flags = !{!3}
+
+!0 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "clang LLVM (rustc version 1.23.0-nightly (discriminator 0))", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
+!1 = !DIFile(filename: "../lib.rs", directory: "/home/alex/code/rust4/lol")
+!2 = distinct !DICompileUnit(language: DW_LANG_Rust, file: !1, producer: "clang LLVM (rustc version 1.23.0-nightly (discriminator 1))", isOptimized: true, runtimeVersion: 0, emissionKind: FullDebug)
+!3 = !{i32 2, !"Debug Info Version", i32 3}
+!4 = distinct !DISubprogram(name: "clone<alloc::string::String>", linkageName: "_ZN5alloc3vec8{{impl}}28clone<alloc::string::String>E", scope: null, file: !1, line: 1519, type: !5, isLocal: false, isDefinition: true, scopeLine: 1519, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !6, variables: !6)
+!5 = !DISubroutineType(types: !6)
+!6 = !{}
+!7 = !DILocation(line: 1612, scope: !8, inlinedAt: !11)
+!8 = distinct !DILexicalBlock(scope: !9, file: !1, line: 86, column: 12)
+!9 = distinct !DISubprogram(name: "allocate_in<alloc::string::String,alloc::heap::Heap>", linkageName: "_ZN5alloc7raw_vec8{{impl}}52allocate_in<alloc::string::String,alloc::heap::Heap>E", scope: !10, file: !1, line: 82, type: !5, isLocal: false, isDefinition: true, scopeLine: 82, flags: DIFlagPrototyped, isOptimized: true, unit: !2, templateParams: !6, variables: !6)
+!10 = distinct !DICompositeType(tag: DW_TAG_structure_type, name: "RawVec<alloc::string::String, alloc::heap::Heap>", file: !1, size: 128, align: 64, elements: !6, identifier: "5c6e4db16d2c64555e40661d70c4d81e")
+!11 = distinct !DILocation(line: 86, scope: !8, inlinedAt: !12)
+!12 = distinct !DILocation(line: 141, scope: !13, inlinedAt: !17)
+!13 = distinct !DISubprogram(name: "with_capacity<alloc::string::String>", linkageName: "_ZN5alloc7raw_vec8{{impl}}36with_capacity<alloc::string::String>E", scope: !10, file: !1, line: 140, type: !5, isLocal: false, isDefinition: true, scopeLine: 140, flags: DIFlagPrototyped, isOptimized: true, unit: !0, templateParams: !6, variables: !14)
+!14 = !{!15}
+!15 = !DILocalVariable(name: "cap", arg: 1, scope: !13, file: !1, line: 1, type: !16)
+!16 = !DIBasicType(name: "usize", size: 64, encoding: DW_ATE_unsigned)
+!17 = !DILocation(line: 1521, scope: !4)
--
1.8.3.1

View File

@ -0,0 +1,69 @@
From 3ab40462f17659a4ae14b1f8aa7036e65377a199 Mon Sep 17 00:00:00 2001
From: Guozhi Wei <carrot@google.com>
Date: Thu, 15 Mar 2018 17:49:12 +0000
Subject: [PATCH] [PPC] Avoid non-simple MVT in STBRX optimization
PR35402 triggered this case. It bswap and stores a 48bit value, current STBRX optimization transforms it into STBRX. Unfortunately 48bit is not a simple MVT, there is no PPC instruction to support it, and it can't be automatically expanded by llvm, so caused a crash.
This patch detects the non-simple MVT and returns early.
Differential Revision: https://reviews.llvm.org/D44500
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@327651 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/Target/PowerPC/PPCISelLowering.cpp | 6 +++++-
test/CodeGen/PowerPC/pr35402.ll | 18 ++++++++++++++++++
2 files changed, 23 insertions(+), 1 deletion(-)
create mode 100644 test/CodeGen/PowerPC/pr35402.ll
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index b3a3c73..7fc3627 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -11861,6 +11861,11 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
N->getOperand(1).getValueType() == MVT::i16 ||
(Subtarget.hasLDBRX() && Subtarget.isPPC64() &&
N->getOperand(1).getValueType() == MVT::i64))) {
+ // STBRX can only handle simple types.
+ EVT mVT = cast<StoreSDNode>(N)->getMemoryVT();
+ if (mVT.isExtended())
+ break;
+
SDValue BSwapOp = N->getOperand(1).getOperand(0);
// Do an any-extend to 32-bits if this is a half-word input.
if (BSwapOp.getValueType() == MVT::i16)
@@ -11868,7 +11873,6 @@ SDValue PPCTargetLowering::PerformDAGCombine(SDNode *N,
// If the type of BSWAP operand is wider than stored memory width
// it need to be shifted to the right side before STBRX.
- EVT mVT = cast<StoreSDNode>(N)->getMemoryVT();
if (Op1VT.bitsGT(mVT)) {
int Shift = Op1VT.getSizeInBits() - mVT.getSizeInBits();
BSwapOp = DAG.getNode(ISD::SRL, dl, Op1VT, BSwapOp,
diff --git a/test/CodeGen/PowerPC/pr35402.ll b/test/CodeGen/PowerPC/pr35402.ll
new file mode 100644
index 0000000..06e6d96
--- /dev/null
+++ b/test/CodeGen/PowerPC/pr35402.ll
@@ -0,0 +1,18 @@
+; RUN: llc -O2 < %s | FileCheck %s
+target triple = "powerpc64le-linux-gnu"
+
+define void @test(i8* %p, i64 %data) {
+entry:
+ %0 = tail call i64 @llvm.bswap.i64(i64 %data)
+ %ptr = bitcast i8* %p to i48*
+ %val = trunc i64 %0 to i48
+ store i48 %val, i48* %ptr, align 1
+ ret void
+
+; CHECK: sth
+; CHECK: stw
+; CHECK-NOT: stdbrx
+
+}
+
+declare i64 @llvm.bswap.i64(i64)
--
1.8.3.1

View File

@ -0,0 +1,79 @@
From a481ab548d038c1dfd52ee211b997e2dd33ff5ae Mon Sep 17 00:00:00 2001
From: Hal Finkel <hfinkel@anl.gov>
Date: Wed, 6 Sep 2017 03:08:26 +0000
Subject: [PATCH] [PowerPC] Don't use xscvdpspn on the P7
xscvdpspn was not introduced until the P8, so don't use it on the P7. Fixes a
regression introduced in r288152.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@312612 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/Target/PowerPC/PPCISelLowering.cpp | 9 ++++++---
test/CodeGen/PowerPC/fp-splat.ll | 27 +++++++++++++++++++++++++++
2 files changed, 33 insertions(+), 3 deletions(-)
create mode 100644 test/CodeGen/PowerPC/fp-splat.ll
diff --git a/lib/Target/PowerPC/PPCISelLowering.cpp b/lib/Target/PowerPC/PPCISelLowering.cpp
index 74dedaf..6295693 100644
--- a/lib/Target/PowerPC/PPCISelLowering.cpp
+++ b/lib/Target/PowerPC/PPCISelLowering.cpp
@@ -7463,9 +7463,11 @@ static SDValue BuildVSLDOI(SDValue LHS, SDValue RHS, unsigned Amt, EVT VT,
/// - The node is a "load-and-splat"
/// In all other cases, we will choose to keep the BUILD_VECTOR.
static bool haveEfficientBuildVectorPattern(BuildVectorSDNode *V,
- bool HasDirectMove) {
+ bool HasDirectMove,
+ bool HasP8Vector) {
EVT VecVT = V->getValueType(0);
- bool RightType = VecVT == MVT::v2f64 || VecVT == MVT::v4f32 ||
+ bool RightType = VecVT == MVT::v2f64 ||
+ (HasP8Vector && VecVT == MVT::v4f32) ||
(HasDirectMove && (VecVT == MVT::v2i64 || VecVT == MVT::v4i32));
if (!RightType)
return false;
@@ -7627,7 +7629,8 @@ SDValue PPCTargetLowering::LowerBUILD_VECTOR(SDValue Op,
// lowered to VSX instructions under certain conditions.
// Without VSX, there is no pattern more efficient than expanding the node.
if (Subtarget.hasVSX() &&
- haveEfficientBuildVectorPattern(BVN, Subtarget.hasDirectMove()))
+ haveEfficientBuildVectorPattern(BVN, Subtarget.hasDirectMove(),
+ Subtarget.hasP8Vector()))
return Op;
return SDValue();
}
diff --git a/test/CodeGen/PowerPC/fp-splat.ll b/test/CodeGen/PowerPC/fp-splat.ll
new file mode 100644
index 0000000..9b1ab21
--- /dev/null
+++ b/test/CodeGen/PowerPC/fp-splat.ll
@@ -0,0 +1,27 @@
+; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-P8 -check-prefix=CHECK
+; RUN: llc -mcpu=pwr7 -mtriple=powerpc64-unknown-linux-gnu < %s | FileCheck %s -check-prefix=CHECK-P7 -check-prefix=CHECK
+
+define <4 x float> @test1(float %a) {
+entry:
+; CHECK-LABEL: test1
+ %vecins = insertelement <4 x float> undef, float %a, i32 0
+ %vecins1 = insertelement <4 x float> %vecins, float %a, i32 1
+ %vecins2 = insertelement <4 x float> %vecins1, float %a, i32 2
+ %vecins3 = insertelement <4 x float> %vecins2, float %a, i32 3
+ ret <4 x float> %vecins3
+; CHECK-P8: xscvdpspn
+; CHECK-P7-NOT: xscvdpspn
+; CHECK: blr
+}
+
+define <2 x double> @test2(double %a) {
+entry:
+; CHECK-LABEL: test2
+ %vecins = insertelement <2 x double> undef, double %a, i32 0
+ %vecins1 = insertelement <2 x double> %vecins, double %a, i32 1
+ ret <2 x double> %vecins1
+; CHECK-P8: xxspltd
+; CHECK-P7: xxspltd
+; CHECK: blr
+}
+
--
1.8.3.1

View File

@ -0,0 +1,42 @@
From ca865fbaa493ff3250db39786c41658037e456ab Mon Sep 17 00:00:00 2001
From: Daniel Jasper <djasper@google.com>
Date: Thu, 12 Oct 2017 13:25:05 +0000
Subject: [PATCH 2/2] Reinstantiate old/bad deduplication logic that was
removed in r315279.
While this shouldn't be necessary anymore, we have cases where we run
into the assertion below, i.e. cases with two non-fragment entries for the
same variable at different frame indices.
This should be fixed, but for now, we should revert to a version that
does not trigger asserts.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@315576 91177308-0d34-0410-b5e6-96231b3b80d8
---
lib/CodeGen/AsmPrinter/DwarfDebug.cpp | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
index 90f6f2f..064450f 100644
--- a/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
+++ b/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
@@ -219,6 +219,16 @@ void DbgVariable::addMMIEntry(const DbgVariable &V) {
assert(!FrameIndexExprs.empty() && "Expected an MMI entry");
assert(!V.FrameIndexExprs.empty() && "Expected an MMI entry");
+ // FIXME: This logic should not be necessary anymore, as we now have proper
+ // deduplication. However, without it, we currently run into the assertion
+ // below, which means that we are likely dealing with broken input, i.e. two
+ // non-fragment entries for the same variable at different frame indices.
+ if (FrameIndexExprs.size()) {
+ auto *Expr = FrameIndexExprs.back().Expr;
+ if (!Expr || !Expr->isFragment())
+ return;
+ }
+
for (const auto &FIE : V.FrameIndexExprs)
// Ignore duplicate entries.
if (llvm::none_of(FrameIndexExprs, [&](const FrameIndexExpr &Other) {
--
1.8.3.1

View File

@ -8,11 +8,11 @@
%global llvm_bindir %{_libdir}/%{name}
%global maj_ver 5
%global min_ver 0
%global patch_ver 0
%global patch_ver 2
Name: llvm
Version: %{maj_ver}.%{min_ver}.%{patch_ver}
Release: 5%{?dist}
Release: 1%{?dist}
Summary: The Low Level Virtual Machine
License: NCSA
@ -25,7 +25,10 @@ Patch3: 0001-CMake-Split-static-library-exports-into-their-own-ex.patch
# FIXME: Symbol versioning breaks some unittests when statically linking
# libstdc++, so we disable it for now.
Patch4: 0001-Revert-Add-a-linker-script-to-version-LLVM-symbols.patch
Patch5: 0001-Merging-r318289.patch
Patch5: 0001-PowerPC-Don-t-use-xscvdpspn-on-the-P7.patch
Patch6: 0001-Ignore-all-duplicate-frame-index-expression.patch
Patch7: 0002-Reinstantiate-old-bad-deduplication-logic-that-was-r.patch
Patch14: 0001-PPC-Avoid-non-simple-MVT-in-STBRX-optimization.patch
BuildRequires: cmake
BuildRequires: zlib-devel
@ -87,13 +90,6 @@ Static libraries for the LLVM compiler infrastructure.
%prep
%autosetup -n %{name}-%{version}.src -p1
%ifarch armv7hl
# These tests are marked as XFAIL, but they still run and hang on ARM.
for f in `grep -Rl 'XFAIL.\+arm' test/ExecutionEngine `; do rm $f; done
%endif
%build
mkdir -p _build
cd _build
@ -216,6 +212,27 @@ fi
%{_libdir}/cmake/llvm/LLVMStaticExports.cmake
%changelog
* Thu May 03 2018 Tom Stellard <tstellar@redhat.com> - 5.0.2-1
- 5.0.2 Release
* Tue Mar 27 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-6
- Re-enable arm tests that used to hang
* Mon Mar 19 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-5
- Backport r327651 from trunk rhbz#1554349
* Wed Mar 07 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-4
- Backport more retpoline patches
* Tue Feb 06 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-3
- Backport retpoline support
* Thu Feb 01 2018 Tom Stellard <tstellar@redhat.com> - 5.0.1-2
- Backport r315279 to fix an issue with rust
* Tue Dec 19 2017 Tom Stellard <tstellar@redhat.com> - 5.0.1-1
- 5.0.1 Release
* Mon Nov 20 2017 Tom Stellard <tstellar@redhat.com> - 5.0.0-5
- Backport debuginfo fix for rust

View File

@ -1,3 +1 @@
SHA512 (llvm-4.0.0.src.tar.xz) = cf681f0626ef6d568d951cdc3e143471a1d7715a0ba11e52aa273cf5d8d421e1357ef2645cc85879eaefcd577e99e74d07b01566825b3d0461171ef2cbfc7704
SHA512 (llvm-4.0.1.src.tar.xz) = 16adc39b34ddb628f81b171119a8e2a0e9138b25011e803ef0b688e2fbea116fc4953d3a1b61b90a98a75e33619f81566b7cb06a9a2ea4d04ac5e0eb303a2d1d
SHA512 (llvm-5.0.0.src.tar.xz) = e6d8fdcb5bf27bded814d02f39f69c6171bc3a512d5957c03e5ac2e231f903b7de87634b059bd5c5da670f7c3a8f7a538f6299225799f15f921857f1452f6b3a
SHA512 (llvm-5.0.2.src.tar.xz) = 3588be5ed969c3f7f6f16f56a12a6af2814d3d3c960d4a36ffebb0446cc75f19220bccee7fc605f9b01f5d5c188a905a046193cc12dec42dd5922048b5c27fe1