[RISCV][compiler-rt] Small fixes for __riscv_feature_bits#100158
Merged
[RISCV][compiler-rt] Small fixes for __riscv_feature_bits#100158
Conversation
Changes included: * Adding CONSTRUCTOR_ATTRIBUTE so that the static data is setup early on in process lifetime. This is required by gcc docs for __builtin_cpu_supports which we hope to implement in terms of this. * Move the length initialization outside of the #if defined(__linux__) block so that the length field always reflects the size of the structures even if non of the feature bits are non-zero. * Change the __riscv_vendor_feature_bits.length field to match the length of the actual structure. Note that this change has not been built or tested. I could not figure out how to get a working cross build for compiler-rt setup.
Contributor
Author
|
After moving to cpu_model directory, compiler-rt could build successfully. |
preames
approved these changes
Jul 23, 2024
Collaborator
preames
left a comment
There was a problem hiding this comment.
LGTM
JFYI, since this seems to be textually the same as the final iteration on my review, I'm going to treat you posting this as an approval on that one. I don't care which one lands. I'm about to run out for an errand, and if this hasn't landed by the time I take another look this afternoon I'll land one or the other.
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/66/builds/2033 Here is the relevant piece of the build log for the reference: |
yuxuanchen1997
pushed a commit
that referenced
this pull request
Jul 25, 2024
Summary: Changes included: - Adding CONSTRUCTOR_ATTRIBUTE so that the static data is setup early on in process lifetime. This is required by gcc docs for __builtin_cpu_supports which we hope to implement in terms of this. - Move the length initialization outside of the #if defined(linux) block so that the length field always reflects the size of the structures even if non of the feature bits are non-zero. - Change the __riscv_vendor_feature_bits.length field to match the length of the actual structure. Note: Copy from #99958 --------- Co-authored-by: Philip Reames <preames@rivosinc.com> Test Plan: Reviewers: Subscribers: Tasks: Tags: Differential Revision: https://phabricator.intern.facebook.com/D60250767
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes included:
Note: Copy from #99958