Skip to content

[flang][NFC] AliasAnalysis: Use Indirect not Unknown for LoadOp #127845

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

Merged
merged 3 commits into from
Feb 21, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions flang/lib/Optimizer/Analysis/AliasAnalysis.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,14 +641,18 @@ AliasAnalysis::Source AliasAnalysis::getSource(mlir::Value v,
} else if (isDummyArgument(def)) {
defOp = nullptr;
v = def;
} else {
type = SourceKind::Indirect;
}

// TODO: This assignment is redundant but somehow works around an
// apparent MSVC bug reporting "undeclared identifier" at the next
// "breakFromLoop = true;". See
// <https://github.com/llvm/llvm-project/pull/127845#issuecomment-2669829610>.
breakFromLoop = true;
return;
} else {
// No further tracking for addresses loaded from memory for now.
type = SourceKind::Indirect;
}

// No further tracking for addresses loaded from memory for now.
type = SourceKind::Indirect;
breakFromLoop = true;
})
.Case<fir::AddrOfOp>([&](auto op) {
Expand Down