mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
SIL: streamline Operand Sequence APIs
* remove `filterUsers(ofType:)`, because it's a duplication of `users(ofType:)`
* rename `filterUses(ofType:)` -> `filter(usersOfType:)`
* rename `ignoreUses(ofType:)` -> `ignore(usersOfType:)`
* rename `getSingleUser` -> `singleUser`
* implement `singleUse` with `Sequence.singleElement`
* implement `ignoreDebugUses` with `ignore(usersOfType:)`
This is a follow-up of eb1d5f484c.
This commit is contained in:
@@ -361,7 +361,7 @@ private struct StackProtectionOptimization {
|
||||
let builder = Builder(after: beginAccess, location: beginAccess.location.asAutoGenerated, context)
|
||||
let temporary = builder.createAllocStack(beginAccess.type)
|
||||
|
||||
beginAccess.uses.ignoreUses(ofType: EndAccessInst.self).replaceAll(with: temporary, context)
|
||||
beginAccess.uses.ignore(usersOfType: EndAccessInst.self).replaceAll(with: temporary, context)
|
||||
|
||||
for endAccess in beginAccess.endInstructions {
|
||||
let endBuilder = Builder(before: endAccess, location: endAccess.location.asAutoGenerated, context)
|
||||
|
||||
Reference in New Issue
Block a user