Skip to content

[DebugInfo][LICM] Debug value info loss caused by removing dead instructions without salvaging #138684

@Apochens

Description

@Apochens
  1. Removing the dead instruction without salvaging the debug value info in hoistGEP:

eraseInstruction(*Src, SafetyInfo, MSSAU);

Code example: https://godbolt.org/z/b3331YxE8

  1. Removing the dead instruction without salvaging the debug value info in hoistAdd:

eraseInstruction(cast<Instruction>(*VariantLHS), SafetyInfo, MSSAU);

Code example: https://godbolt.org/z/TbjdP5Y1d

  1. Removing the dead instruction without salvaging the debug value info in hoistSub:

eraseInstruction(cast<Instruction>(*VariantLHS), SafetyInfo, MSSAU);

Code example: https://godbolt.org/z/h3veE8fj9

  1. Removing the dead instruction without salvaging the debug value info in hoistBOAssociation:

if (BO0->use_empty())
eraseInstruction(*BO0, SafetyInfo, MSSAU);

Code example: https://godbolt.org/z/9nE7Tob6E

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions