Skip to content

[AssumptionCache] Track GlobalValues as affected values. #65425

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

tylanphear
Copy link
Contributor

Fixes a corner case of the analysis: previously GlobalValues could be affected by assumptions, but were not tracked within AffectedValues. This patch allows assumptions which affect a given GlobalValue to be looked up via assumptionsFor().

A small update to llvm/test/Analysis/ScalarEvolution/ranges.ll was necessary due to knowledge about a global value now being propagated from AssumptionCache -> ValueTracking -> ScalarEvolution.

Fixes a corner case of the analysis: previously GlobalValues could be
affected by assumptions, but were not tracked within AffectedValues.
This patch allows assumptions which affect a given GlobalValue to be
looked up via `assumptionsFor()`.

A small update to llvm/test/Analysis/ScalarEvolution/ranges.ll was
necessary due to knowledge about a global value now being propagated
from AssumptionCache -> ValueTracking -> ScalarEvolution.
@tylanphear tylanphear requested a review from a team as a code owner September 6, 2023 00:30
@tylanphear
Copy link
Contributor Author

Migrated this from https://reviews.llvm.org/D159385 (where it was originally approved by @jdoerfert)

@tylanphear tylanphear merged commit 5224039 into llvm:main Sep 6, 2023
@tylanphear tylanphear deleted the allow_global_values_to_be_tracked_in_assumption_cache branch September 6, 2023 22:46
avillega pushed a commit to avillega/llvm-project that referenced this pull request Sep 11, 2023
Fixes a corner case of the analysis: previously GlobalValues could be
affected by assumptions, but were not tracked within AffectedValues.
This patch allows assumptions which affect a given GlobalValue to be
looked up via `assumptionsFor()`.

A small update to llvm/test/Analysis/ScalarEvolution/ranges.ll was
necessary due to knowledge about a global value now being propagated
from AssumptionCache -> ValueTracking -> ScalarEvolution.
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.

2 participants