-
Notifications
You must be signed in to change notification settings - Fork 15.2k
[ValueTracking] Add CharWidth argument to getConstantStringInfo (NFC) #106541
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
Draft
s-barannikov
wants to merge
1
commit into
users/s-barannikov/byte/5-match-ptradd
Choose a base branch
from
users/s-barannikov/byte/6-string-info-char-width
base: users/s-barannikov/byte/5-match-ptradd
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
[ValueTracking] Add CharWidth argument to getConstantStringInfo (NFC) #106541
s-barannikov
wants to merge
1
commit into
users/s-barannikov/byte/5-match-ptradd
from
users/s-barannikov/byte/6-string-info-char-width
Conversation
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
This was referenced Aug 29, 2024
Contributor
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Aug 29, 2024
7cca421 to
14e8b41
Compare
e5b70fc to
cdb7292
Compare
14e8b41 to
61be980
Compare
cdb7292 to
d27bc30
Compare
61be980 to
222a3b7
Compare
d27bc30 to
deca69b
Compare
222a3b7 to
26dc400
Compare
deca69b to
57104d1
Compare
26dc400 to
e75ad5f
Compare
57104d1 to
fe95d64
Compare
e75ad5f to
5604e7a
Compare
fe95d64 to
24ff5d6
Compare
5604e7a to
161e6ba
Compare
24ff5d6 to
0a21746
Compare
161e6ba to
68b0d70
Compare
0a21746 to
b878d88
Compare
68b0d70 to
4d50f23
Compare
b878d88 to
1591f0b
Compare
The method assumes that host chars and target chars have the same width. Add a CharWidth argument so that it can bail out if the requested char width differs from the host char width. Alternatively, the check could be done at call sites, but this is more error-prone. In the future, this method will be replaced with a different one that allows host/target chars to have different widths. The prototype will be the same except that StringRef is replaced with something that is byte width agnostic. Adding CharWidth argument now reduces the future diff.
4d50f23 to
856e1f0
Compare
1591f0b to
0d66f01
Compare
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.

The method assumes that host chars and target chars have the same width.
Add a CharWidth argument so that it can bail out if the requested char
width differs from the host char width.
Alternatively, the check could be done at call sites, but this is more
error-prone.
In the future, this method will be replaced with a different one that
allows host/target chars to have different widths. The prototype will
be the same except that StringRef is replaced with something that is
byte width agnostic. Adding CharWidth argument now reduces the future
diff.