[all-commits] [llvm/llvm-project] 08d0b5: [SwiftError] Use IMPLICIT_DEF as a definition for ...

Filipp Zhinkin via All-commits all-commits at lists.llvm.org
Sun Aug 20 04:00:45 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 08d0b558f50930d3ec1dccc20d4ee0db1035b89e
      https://github.com/llvm/llvm-project/commit/08d0b558f50930d3ec1dccc20d4ee0db1035b89e
  Author: Filipp Zhinkin <filipp.zhinkin at gmail.com>
  Date:   2023-08-20 (Sun, 20 Aug 2023)

  Changed paths:
    M llvm/lib/CodeGen/SwiftErrorValueTracking.cpp
    A llvm/test/CodeGen/AArch64/swift-error-unreachable-use.ll

  Log Message:
  -----------
  [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




More information about the All-commits mailing list