Skip to content
Commit 08d0b558 authored by Filipp Zhinkin's avatar Filipp Zhinkin
Browse files

[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
parent 1b956616
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment