[SwiftError] Use IMPLICIT_DEF as a definition for unreachable VReg uses
SwiftErrorValueTracking creates vregs at swifterror use sites and then connects it with appropriate definitions after instruction selection. To propagate swifterror values SwiftErrorValueTracking::propagateVRegs iterates over basic blocks in RPO, but some vregs previously created at use sites may be located in blocks that became unreachable after instruction selection. Because of that there will no definition for such vregs and that may cause issues down the pipeline. To ensure that all vregs created by the SwiftErrorValueTracking will be defined propagateVRegs was updated to insert IMPLICIT_DEF at the beginning of unreachable blocks containing swifterror uses. Related issue: https://github.com/llvm/llvm-project/issues/59751 Reviewed By: compnerd Differential Revision: https://reviews.llvm.org/D141053
Loading
Please sign in to comment