swift
7569ff1e - [WIP] [AutoDiff] Fix AllocStack SILDebugVariable assertion failure. (#27486)

Commit
6 years ago
[WIP] [AutoDiff] Fix AllocStack SILDebugVariable assertion failure. (#27486) https://github.com/apple/swift/pull/27238 tightened debug info requirements, adding assertions to AllocStack and AllocBox constructors. This requires differentiation transform changes: - When cloning `alloc_stack` instructions that may have SILDebugVariable info, propagate the info. - This is relevant for `JVPEmitter::emitTangentForAllocStackInst`. - When using AllocStack for "local allocations" that do not correspond to user-written VarDecls, use `RegularLocation::getAutoGeneratedLocation()` as the location so that assertions do not trigger. - This is relevant for `PullbackEmitter::getAdjointBuffer`.
Author
Parents
Loading