[llvm-branch-commits] [llvm-branch] r258267 - Merging r257977:
Hans Wennborg via llvm-branch-commits
llvm-branch-commits at lists.llvm.org
Tue Jan 19 16:48:30 PST 2016
Author: hans
Date: Tue Jan 19 18:48:30 2016
New Revision: 258267
URL: http://llvm.org/viewvc/llvm-project?rev=258267&view=rev
Log:
Merging r257977:
------------------------------------------------------------------------
r257977 | kfischer | 2016-01-15 17:11:33 -0800 (Fri, 15 Jan 2016) | 1 line
[DwarfDebug] Move MergeValues to .cpp, NFC
------------------------------------------------------------------------
Merging r257979:
------------------------------------------------------------------------
r257979 | kfischer | 2016-01-15 17:15:32 -0800 (Fri, 15 Jan 2016) | 11 lines
[DwarfDebug] Don't merge DebugLocEntries if their pieces overlap
Summary:
Later in DWARF emission we check that DebugLocEntries have
non-overlapping pieces, so we should create any such entries
by merging here.
Fixes PR26163.
Reviewers: aprantl
Differential Revision: http://reviews.llvm.org/D16249
------------------------------------------------------------------------
Added:
llvm/branches/release_38/test/DebugInfo/ARM/PR26163.ll
- copied unchanged from r257979, llvm/trunk/test/DebugInfo/ARM/PR26163.ll
Modified:
llvm/branches/release_38/ (props changed)
llvm/branches/release_38/lib/CodeGen/AsmPrinter/DebugLocEntry.h
llvm/branches/release_38/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
Propchange: llvm/branches/release_38/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Tue Jan 19 18:48:30 2016
@@ -1,3 +1,3 @@
/llvm/branches/Apple/Pertwee:110850,110961
/llvm/branches/type-system-rewrite:133420-134817
-/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257902,257905,257925,257929-257930,257997,258168
+/llvm/trunk:155241,257645,257648,257730,257775,257791,257875,257902,257905,257925,257929-257930,257977,257979,257997,258168
Modified: llvm/branches/release_38/lib/CodeGen/AsmPrinter/DebugLocEntry.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/AsmPrinter/DebugLocEntry.h?rev=258267&r1=258266&r2=258267&view=diff
==============================================================================
--- llvm/branches/release_38/lib/CodeGen/AsmPrinter/DebugLocEntry.h (original)
+++ llvm/branches/release_38/lib/CodeGen/AsmPrinter/DebugLocEntry.h Tue Jan 19 18:48:30 2016
@@ -93,18 +93,7 @@ public:
/// variable, merge them by appending Next's values to the current
/// list of values.
/// Return true if the merge was successful.
- bool MergeValues(const DebugLocEntry &Next) {
- if (Begin == Next.Begin) {
- auto *Expr = cast_or_null<DIExpression>(Values[0].Expression);
- auto *NextExpr = cast_or_null<DIExpression>(Next.Values[0].Expression);
- if (Expr->isBitPiece() && NextExpr->isBitPiece()) {
- addValues(Next.Values);
- End = Next.End;
- return true;
- }
- }
- return false;
- }
+ bool MergeValues(const DebugLocEntry &Next);
/// \brief Attempt to merge this DebugLocEntry with Next and return
/// true if the merge was successful. Entries can be merged if they
Modified: llvm/branches/release_38/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/release_38/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=258267&r1=258266&r2=258267&view=diff
==============================================================================
--- llvm/branches/release_38/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
+++ llvm/branches/release_38/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Tue Jan 19 18:48:30 2016
@@ -805,6 +805,24 @@ static bool piecesOverlap(const DIExpres
return (l1 < r2) && (l2 < r1);
}
+/// \brief If this and Next are describing different pieces of the same
+/// variable, merge them by appending Next's values to the current
+/// list of values.
+/// Return true if the merge was successful.
+bool DebugLocEntry::MergeValues(const DebugLocEntry &Next) {
+ if (Begin == Next.Begin) {
+ auto *Expr = cast_or_null<DIExpression>(Values[0].Expression);
+ auto *NextExpr = cast_or_null<DIExpression>(Next.Values[0].Expression);
+ if (Expr->isBitPiece() && NextExpr->isBitPiece() &&
+ !piecesOverlap(Expr, NextExpr)) {
+ addValues(Next.Values);
+ End = Next.End;
+ return true;
+ }
+ }
+ return false;
+}
+
/// Build the location list for all DBG_VALUEs in the function that
/// describe the same variable. If the ranges of several independent
/// pieces of the same variable overlap partially, split them up and
More information about the llvm-branch-commits
mailing list