File tree Expand file tree Collapse file tree 4 files changed +1297
-79
lines changed
lib/SILOptimizer/LoopTransforms Expand file tree Collapse file tree 4 files changed +1297
-79
lines changed Original file line number Diff line number Diff line change @@ -541,6 +541,7 @@ class SILInstruction
541
541
SILValue getOperand (unsigned Num) const {
542
542
return getAllOperands ()[Num].get ();
543
543
}
544
+ Operand &getOperandRef (unsigned Num) { return getAllOperands ()[Num]; }
544
545
void setOperand (unsigned Num, SILValue V) { getAllOperands ()[Num].set (V); }
545
546
void swapOperands (unsigned Num1, unsigned Num2) {
546
547
getAllOperands ()[Num1].swap (getAllOperands ()[Num2]);
Original file line number Diff line number Diff line change @@ -125,6 +125,9 @@ class StructUseCollector {
125
125
if (!ElementAddressUsers.empty ())
126
126
return false ;
127
127
for (SILInstruction *user : StructAddressUsers) {
128
+ // ignore load users
129
+ if (isa<LoadInst>(user))
130
+ continue ;
128
131
if (user != use1 && user != use2)
129
132
return false ;
130
133
}
@@ -184,6 +187,7 @@ class StructUseCollector {
184
187
// Found a use of the struct at the given access path.
185
188
if (auto *LoadI = dyn_cast<LoadInst>(UseInst)) {
186
189
StructLoads.push_back (LoadI);
190
+ StructAddressUsers.push_back (LoadI);
187
191
continue ;
188
192
}
189
193
You can’t perform that action at this time.
0 commit comments