This repository was archived by the owner on Nov 1, 2021. It is now read-only.
File tree 1 file changed +8
-8
lines changed
1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -1096,7 +1096,14 @@ bool ExpandI64::runOnModule(Module &M) {
1096
1096
PN->dropAllReferences ();
1097
1097
}
1098
1098
1099
- // Apply basic block changes to phis, now that phis are all processed
1099
+ // Delete instructions which were replaced. We do this after the full walk
1100
+ // of the instructions so that all uses are replaced first.
1101
+ while (!Dead.empty ()) {
1102
+ Instruction *D = Dead.pop_back_val ();
1103
+ D->eraseFromParent ();
1104
+ }
1105
+
1106
+ // Apply basic block changes to phis, now that phis are all processed (and illegal phis erased)
1100
1107
for (unsigned i = 0 ; i < PhiBlockChanges.size (); i++) {
1101
1108
PhiBlockChange &Change = PhiBlockChanges[i];
1102
1109
for (BasicBlock::iterator I = Change.DD ->begin (); I != Change.DD ->end (); ++I) {
@@ -1108,13 +1115,6 @@ bool ExpandI64::runOnModule(Module &M) {
1108
1115
}
1109
1116
}
1110
1117
1111
- // Delete instructions which were replaced. We do this after the full walk
1112
- // of the instructions so that all uses are replaced first.
1113
- while (!Dead.empty ()) {
1114
- Instruction *D = Dead.pop_back_val ();
1115
- D->eraseFromParent ();
1116
- }
1117
-
1118
1118
// We only visited blocks found by a DFS walk from the entry, so we haven't
1119
1119
// visited any unreachable blocks, and they may still contain illegal
1120
1120
// instructions at this point. Being unreachable, they can simply be deleted.
You can’t perform that action at this time.
0 commit comments