Skip to content

Commit 1ccaa98

Browse files
committed
Clear GEPChainInfoMap after visiting a function
It is possible for GEPOperator* to overlap between function visits, so we have to clear the map or else there could be stale data leftover that causes GEPs to be incorrectly generated or skipped over.
1 parent dee77e9 commit 1ccaa98

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

llvm/lib/Target/DirectX/DXILFlattenArrays.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ class DXILFlattenArraysVisitor
9292
} // namespace
9393

9494
bool DXILFlattenArraysVisitor::finish() {
95+
GEPChainInfoMap.clear();
9596
RecursivelyDeleteTriviallyDeadInstructionsPermissive(PotentiallyDeadInstrs);
9697
return true;
9798
}

0 commit comments

Comments
 (0)