swift
619b4cd5 - CSE: Don't look through ownership instructions for escaped values

Commit
2 years ago
CSE: Don't look through ownership instructions for escaped values CSE relies on OSSA RAUW for lifetime extension when replacing a redundant instruction. OSSA RAUW however does not handle lifetime extension for escaped base values. Values escape from ownership via pointer escape, bitwise escape, forwarding unowned operations and have none or unowned ownership. For all such values do not look through ownership instructions while determining equality. It is possible to CSE such values with equivalent operands, because the operand use guarantees lifetime of the base operand.
Author
Committer
Parents
  • include/swift/SIL
    • File
      SILInstruction.h
  • lib/SILOptimizer/Transforms
    • File
      CSE.cpp
  • test/SILOptimizer
    • cse_ossa.sil
    • cse_ossa_nontrivial.sil