[PATCH] D141854: [Assignment Tracking] Fix invalidated iterator usage
Orlando Cazalet-Hyams via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 20 06:31:15 PST 2023
This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rGe3a00d51864e: [Assignment Tracking] Fix invalidated iterator usage (authored by Orlando).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D141854/new/
https://reviews.llvm.org/D141854
Files:
llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
Index: llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
===================================================================
--- llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
+++ llvm/lib/CodeGen/AssignmentTrackingAnalysis.cpp
@@ -651,14 +651,19 @@
// [ - i - ]
// +
// [ i ][ f ][ i ]
+
+ // Save values for use after inserting a new interval.
auto EndBitOfOverlap = FirstOverlap.stop();
+ unsigned OverlapValue = FirstOverlap.value();
+
+ // Shorten the overlapping interval.
FirstOverlap.setStop(StartBit);
insertMemLoc(BB, Before, Var, FirstOverlap.start(), StartBit,
- *FirstOverlap, VarLoc.DL);
+ OverlapValue, VarLoc.DL);
// Insert a new interval to represent the end part.
- FragMap.insert(EndBit, EndBitOfOverlap, *FirstOverlap);
- insertMemLoc(BB, Before, Var, EndBit, EndBitOfOverlap, *FirstOverlap,
+ FragMap.insert(EndBit, EndBitOfOverlap, OverlapValue);
+ insertMemLoc(BB, Before, Var, EndBit, EndBitOfOverlap, OverlapValue,
VarLoc.DL);
// Insert the new (middle) fragment now there is space.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141854.490812.patch
Type: text/x-patch
Size: 1164 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230120/0207634f/attachment.bin>
More information about the llvm-commits
mailing list