-
Notifications
You must be signed in to change notification settings - Fork 11.5k
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
Conversation
@llvm/pr-subscribers-clang Author: Brian Cain (androm3da) ChangesThis 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:
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
|
There was a problem hiding this 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.
2641525
to
537cda8
Compare
Not sure why I omitted it -- thanks. Fixed. |
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>
537cda8
to
ffccfde
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thank you!
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>
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.