File tree 1 file changed +4
-4
lines changed
src/cmd/compile/internal/ssa
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -299,7 +299,7 @@ func elimUnreadAutos(f *Func) {
299
299
// Loop over all ops that affect autos taking note of which
300
300
// autos we need and also stores that we might be able to
301
301
// eliminate.
302
- seen := make ( map [ * ir.Name ] bool )
302
+ var seen ir.NameSet
303
303
var stores []* Value
304
304
for _ , b := range f .Blocks {
305
305
for _ , v := range b .Values {
@@ -317,7 +317,7 @@ func elimUnreadAutos(f *Func) {
317
317
// If we haven't seen the auto yet
318
318
// then this might be a store we can
319
319
// eliminate.
320
- if ! seen [ n ] {
320
+ if ! seen . Has ( n ) {
321
321
stores = append (stores , v )
322
322
}
323
323
default :
@@ -327,7 +327,7 @@ func elimUnreadAutos(f *Func) {
327
327
// because dead loads haven't been
328
328
// eliminated yet.
329
329
if v .Uses > 0 {
330
- seen [ n ] = true
330
+ seen . Add ( n )
331
331
}
332
332
}
333
333
}
@@ -336,7 +336,7 @@ func elimUnreadAutos(f *Func) {
336
336
// Eliminate stores to unread autos.
337
337
for _ , store := range stores {
338
338
n , _ := store .Aux .(* ir.Name )
339
- if seen [ n ] {
339
+ if seen . Has ( n ) {
340
340
continue
341
341
}
342
342
You can’t perform that action at this time.
0 commit comments