Skip to content

Conversation

@1997alireza
Copy link
Contributor

@1997alireza 1997alireza commented Nov 6, 2024

Currently, functions within the same module are assigned unique TBAA type system IDs based on their order, but functions in different modules can unintentionally receive the same ID, leading to incorrect non-aliasing results. This patch resolves the issue by appending a hash of the module name to each function type system metadata, ensuring unique type systems across modules and preventing aliasing errors. This resolves #1458.

@1997alireza 1997alireza force-pushed the fix-tbaa-duplicate branch 4 times, most recently from 5f2b4e0 to 96619fa Compare December 3, 2024 19:16
Copy link
Collaborator

@bryanpkc bryanpkc left a comment

Choose a reason for hiding this comment

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

LGTM.

Copy link
Collaborator

@pawosm-arm pawosm-arm left a comment

Choose a reason for hiding this comment

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

LGTM, just asked one control question.

In Flang, functions within the same module are assigned unique TBAA
type system IDs based on their order, but functions in different
modules can unintentionally receive the same ID, leading to incorrect
non-aliasing results. This commit resolves the issue by appending a
hash of the module name to each function type system metadata, ensuring
unique type systems across modules and preventing aliasing errors.
@pawosm-arm pawosm-arm self-requested a review December 4, 2024 23:05
@bryanpkc bryanpkc merged commit fc62659 into flang-compiler:master Dec 5, 2024
10 checks passed
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.

Incorrect no alias by TBAA due to a problem with metadata tags

4 participants