Skip to content
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

[hexagon] Add {con,de}structive interference size defn #94877

Merged
merged 1 commit into from
Jul 9, 2024

Conversation

androm3da
Copy link
Member

This support was originally added in 72c373b ([C++17] Support _GCC[CON|DE]STRUCTIVE_SIZE (#89446), 2024-04-26). We're overriding the values for Hexagon here.

@llvmbot llvmbot added clang Clang issues not falling into any other category clang:frontend Language frontend issues, e.g. anything involving "Sema" labels Jun 9, 2024
@llvmbot
Copy link
Collaborator

llvmbot commented Jun 9, 2024

@llvm/pr-subscribers-clang

Author: Brian Cain (androm3da)

Changes

This support was originally added in 72c373b ([C++17] Support _GCC[CON|DE]STRUCTIVE_SIZE (#89446), 2024-04-26). We're overriding the values for Hexagon here.


Full diff: https://github.com/llvm/llvm-project/pull/94877.diff

1 Files Affected:

  • (modified) clang/lib/Basic/Targets/Hexagon.h (+4)
diff --git a/clang/lib/Basic/Targets/Hexagon.h b/clang/lib/Basic/Targets/Hexagon.h
index cdb47dbae7999..f5e7a8878f01b 100644
--- a/clang/lib/Basic/Targets/Hexagon.h
+++ b/clang/lib/Basic/Targets/Hexagon.h
@@ -139,6 +139,10 @@ class LLVM_LIBRARY_VISIBILITY HexagonTargetInfo : public TargetInfo {
   }
 
   bool hasBitIntType() const override { return true; }
+
+  std::pair<unsigned, unsigned> hardwareInterferenceSizes() const override {
+    return std::make_pair(32, 32);
+  }
 };
 } // namespace targets
 } // namespace clang

Copy link
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM as far as the code goes, but please add some test coverage for the changes.

@androm3da
Copy link
Member Author

LGTM as far as the code goes, but please add some test coverage for the changes.

Not sure why I omitted it -- thanks. Fixed.

@androm3da androm3da marked this pull request as draft June 19, 2024 21:44
@androm3da
Copy link
Member Author

I was mistaken: it appears that the cache line size is not the same among all CPUs. I'll revise this PR.

Since I'm away from the office for a couple of weeks, I've switched this PR to a draft. I'll revisit it when I return and promote it when updated.

This support was originally added in 72c373b ([C++17] Support
__GCC_[CON|DE]STRUCTIVE_SIZE (llvm#89446), 2024-04-26).  We're overriding
the values for Hexagon here.

Signed-off-by: Brian Cain <bcain@quicinc.com>
@androm3da androm3da marked this pull request as ready for review July 6, 2024 02:34
Copy link
Collaborator

@AaronBallman AaronBallman left a comment

Choose a reason for hiding this comment

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

LGTM, thank you!

@androm3da androm3da merged commit c91b50e into llvm:main Jul 9, 2024
9 checks passed
aaryanshukla pushed a commit to aaryanshukla/llvm-project that referenced this pull request Jul 14, 2024
This support was originally added in 72c373b ([C++17] Support
__GCC_[CON|DE]STRUCTIVE_SIZE (llvm#89446), 2024-04-26). We're overriding the
values for Hexagon here.

Signed-off-by: Brian Cain <bcain@quicinc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:frontend Language frontend issues, e.g. anything involving "Sema" clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants