Swift SIL: rename parent accessors to parentX, e.g. Instruction.parentBlock

It makes it easier to read
This commit is contained in:
Erik Eckstein
2022-12-23 13:43:45 +01:00
parent 0812484a4a
commit 6c35258f83
22 changed files with 77 additions and 77 deletions

View File

@@ -50,14 +50,14 @@ struct InstructionRange : CustomStringConvertible, NoReflectionChildren {
init(begin beginInst: Instruction, _ context: PassContext) {
self.begin = beginInst
self.blockRange = BasicBlockRange(begin: beginInst.block, context)
self.blockRange = BasicBlockRange(begin: beginInst.parentBlock, context)
self.insertedInsts = InstructionSet(context)
}
/// Insert a potential end instruction.
mutating func insert(_ inst: Instruction) {
insertedInsts.insert(inst)
blockRange.insert(inst.block)
blockRange.insert(inst.parentBlock)
}
/// Insert a sequence of potential end instructions.
@@ -69,7 +69,7 @@ struct InstructionRange : CustomStringConvertible, NoReflectionChildren {
/// Returns true if the exclusive range contains `inst`.
func contains(_ inst: Instruction) -> Bool {
let block = inst.block
let block = inst.parentBlock
if !blockRange.inclusiveRangeContains(block) { return false }
var inRange = false
if blockRange.contains(block) {