Skip to content

remove_paired_rc: not currently needed #9466

@asterite

Description

@asterite

The SSA pass removes pairs of inc_rc and dec_rc.

However, the compiler currently doesn't produce any dec_rc instructions. That means that the pass will never find such pairs.

This has further implications:

  • Expression::Drop is never produced by the compiler so it could also be removed
  • The dec_rc instruction could be removed, together with all of its related code

But maybe that change would be too big and hard to revert if we ever wanted to bring dec_rc back. So some options:

  • Assess brining back Expression::Drop and dec_rc, documenting why they lead to worse generated code if they are added back (or keep them if that's not the case)
  • At least not run the "remove paired rc" pass for now

Metadata

Metadata

Assignees

No one assigned

    Labels

    auditPreparation or execution of security code audits.enhancementNew feature or request

    Type

    No type

    Projects

    Status

    📋 Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions