Skip to content

[DeadObjectElimination] Handle MarkDependenceAddr as its own Access kind - #92510

Open
aidan-hall wants to merge 1 commit into
swiftlang:mainfrom
aidan-hall:fix-doe-mda-over-consume
Open

aidan-hall wants to merge 1 commit into
swiftlang:mainfrom
aidan-hall:fix-doe-mda-over-consume

Conversation

@aidan-hall

Copy link
Copy Markdown
Contributor

In #91813, we changed DeadObjectElimination to treat mark_dependence_addr as a load-like use of its address operand. This was the wrong approach, since mark_dependence_addr changes an attribute of the stored value (adding a dependence on the base operand), making it more like a store. Unlike store, it retains the original value at the address, so we treat it as its own combined load & store Access kind.

This fixes the regressions introduced by #91813, while retaining the desired behaviour.

Fixes rdar://187806150, issue #92448.

Assisted-by: Claude Opus 5

In swiftlang#91813, we changed DeadObjectElimination to treat mark_dependence_addr as a
load-like use of its address operand. This was the wrong approach, since
mark_dependence_addr changes an attribute of the stored value (adding a
dependence on the base operand), making it more like a store. Unlike store, it
retains the original value at the address, so we treat it as its own combined
load & store Access kind.

This fixes the regressions introduced by swiftlang#91813, while retaining the desired
behaviour.

Fixes rdar://187806150, issue swiftlang#92448.

Assisted-by: Claude Opus 5
@aidan-hall
aidan-hall marked this pull request as ready for review September 22, 2026 11:01
@aidan-hall

Copy link
Copy Markdown
Contributor Author

@swift-ci smoke test

@aidan-hall

Copy link
Copy Markdown
Contributor Author

@swift-ci test

@aidan-hall aidan-hall linked an issue Sep 22, 2026 that may be closed by this pull request

@eeckstein eeckstein left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CopyPropagation produces invalid OSSA when using an Iterable

2 participants