[PATCH] D53464: CGP: Clear data structures at the end of a loop iteration instead of the beginning.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 14:25:34 PDT 2018
This revision was automatically updated to reflect the committed changes.
Closed by commit rL345082: CGP: Clear data structures at the end of a loop iteration instead of theā¦ (authored by pcc, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53464?vs=170286&id=170753#toc
Repository:
rL LLVM
https://reviews.llvm.org/D53464
Files:
llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
llvm/trunk/test/CodeGen/Thumb2/unreachable-large-offset-gep.ll
Index: llvm/trunk/test/CodeGen/Thumb2/unreachable-large-offset-gep.ll
===================================================================
--- llvm/trunk/test/CodeGen/Thumb2/unreachable-large-offset-gep.ll
+++ llvm/trunk/test/CodeGen/Thumb2/unreachable-large-offset-gep.ll
@@ -0,0 +1,22 @@
+; RUN: llc -o - %s | FileCheck %s
+
+; CHECK: .LBB0_1:
+; CHECK: b .LBB0_1
+
+target triple = "thumbv8m-unknown-linux-android"
+
+define void @d(i32* %c) {
+entry:
+ br i1 false, label %f.exit, label %i.d
+
+i.d:
+ br label %i.d
+
+f.exit:
+ %0 = getelementptr i32, i32* %c, i32 57
+ br label %if.g
+
+if.g:
+ store i32 0, i32* %0
+ ret void
+}
Index: llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
===================================================================
--- llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
+++ llvm/trunk/lib/CodeGen/CodeGenPrepare.cpp
@@ -436,11 +436,6 @@
bool MadeChange = true;
while (MadeChange) {
MadeChange = false;
- SeenChainsForSExt.clear();
- ValToSExtendedUses.clear();
- RemovedInsts.clear();
- LargeOffsetGEPMap.clear();
- LargeOffsetGEPID.clear();
for (Function::iterator I = F.begin(); I != F.end(); ) {
BasicBlock *BB = &*I++;
bool ModifiedDTOnIteration = false;
@@ -460,6 +455,11 @@
I->deleteValue();
EverMadeChange |= MadeChange;
+ SeenChainsForSExt.clear();
+ ValToSExtendedUses.clear();
+ RemovedInsts.clear();
+ LargeOffsetGEPMap.clear();
+ LargeOffsetGEPID.clear();
}
SunkAddrs.clear();
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53464.170753.patch
Type: text/x-patch
Size: 1505 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20181023/e53c06a4/attachment.bin>
More information about the llvm-commits
mailing list