[Autodiff] Adds logic to generate specialized functions in the closure-spec pass

This commit is contained in:
Kshitij
2024-04-03 16:00:27 -07:00
parent 15cab3a19f
commit ab751d57ab
21 changed files with 1279 additions and 268 deletions

View File

@@ -122,6 +122,8 @@ public struct InstructionList : CollectionLikeSequence, IteratorProtocol {
public var first: Instruction? { currentInstruction }
public var last: Instruction? { reversed().first }
public func reversed() -> ReverseInstructionList {
if let inst = currentInstruction {
let lastInst = inst.bridged.getLastInstOfParent().instruction