-
Notifications
You must be signed in to change notification settings - Fork 14.3k
[GISel] [NFC] Capitalize loop indices in GISelValueTracking.cpp for style consistency #143113
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
Merged
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
@llvm/pr-subscribers-llvm-globalisel Author: Usha Gupta (usha1830) ChangesFollowing up on a comment on #142355. @jayfoad Full diff: https://github.com/llvm/llvm-project/pull/143113.diff 1 Files Affected:
diff --git a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
index 2d276f05e24cf..135e1d2163e23 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelValueTracking.cpp
@@ -222,11 +222,11 @@ void GISelValueTracking::computeKnownBitsImpl(Register R, KnownBits &Known,
// Collect the known bits that are shared by every demanded vector element.
Known.Zero.setAllBits();
Known.One.setAllBits();
- for (unsigned i = 0, e = MI.getNumOperands() - 1; i < e; ++i) {
- if (!DemandedElts[i])
+ for (unsigned I = 0, E = MI.getNumOperands() - 1; I < E; ++I) {
+ if (!DemandedElts[I])
continue;
- computeKnownBitsImpl(MI.getOperand(i + 1).getReg(), Known2, APInt(1, 1),
+ computeKnownBitsImpl(MI.getOperand(I + 1).getReg(), Known2, APInt(1, 1),
Depth + 1);
// Known bits are the values that are shared by every demanded element.
@@ -685,11 +685,11 @@ void GISelValueTracking::computeKnownBitsImpl(Register R, KnownBits &Known,
MRI.getType(MI.getOperand(1).getReg()).getNumElements();
unsigned NumSubVectors = MI.getNumOperands() - 1;
- for (unsigned i = 0; i != NumSubVectors; ++i) {
+ for (unsigned I = 0; I != NumSubVectors; ++I) {
APInt DemandedSub =
- DemandedElts.extractBits(NumSubVectorElts, i * NumSubVectorElts);
+ DemandedElts.extractBits(NumSubVectorElts, I * NumSubVectorElts);
if (!!DemandedSub) {
- computeKnownBitsImpl(MI.getOperand(i + 1).getReg(), Known2, DemandedSub,
+ computeKnownBitsImpl(MI.getOperand(I + 1).getReg(), Known2, DemandedSub,
Depth + 1);
Known = Known.intersectWith(Known2);
@@ -1944,11 +1944,11 @@ unsigned GISelValueTracking::computeNumSignBits(Register R,
// Collect the known bits that are shared by every demanded vector element.
FirstAnswer = TyBits;
APInt SingleDemandedElt(1, 1);
- for (unsigned i = 0, e = MI.getNumOperands() - 1; i < e; ++i) {
- if (!DemandedElts[i])
+ for (unsigned I = 0, E = MI.getNumOperands() - 1; I < E; ++I) {
+ if (!DemandedElts[I])
continue;
- unsigned Tmp2 = computeNumSignBits(MI.getOperand(i + 1).getReg(),
+ unsigned Tmp2 = computeNumSignBits(MI.getOperand(I + 1).getReg(),
SingleDemandedElt, Depth + 1);
FirstAnswer = std::min(FirstAnswer, Tmp2);
@@ -1967,12 +1967,12 @@ unsigned GISelValueTracking::computeNumSignBits(Register R,
unsigned NumSubVectorElts =
MRI.getType(MI.getOperand(1).getReg()).getNumElements();
unsigned NumSubVectors = MI.getNumOperands() - 1;
- for (unsigned i = 0; i < NumSubVectors; ++i) {
+ for (unsigned I = 0; I < NumSubVectors; ++I) {
APInt DemandedSub =
- DemandedElts.extractBits(NumSubVectorElts, i * NumSubVectorElts);
+ DemandedElts.extractBits(NumSubVectorElts, I * NumSubVectorElts);
if (!DemandedSub)
continue;
- unsigned Tmp2 = computeNumSignBits(MI.getOperand(i + 1).getReg(),
+ unsigned Tmp2 = computeNumSignBits(MI.getOperand(I + 1).getReg(),
DemandedSub, Depth + 1);
FirstAnswer = std::min(FirstAnswer, Tmp2);
|
arsenm
approved these changes
Jun 6, 2025
@arsenm Could you please merge this PR? |
nvjle
added a commit
that referenced
this pull request
Jun 7, 2025
rorth
pushed a commit
to rorth/llvm-project
that referenced
this pull request
Jun 11, 2025
…tyle consistency (llvm#143113) Following up on a comment on llvm#142355. Updated other instances in the file as well. @jayfoad
rorth
pushed a commit
to rorth/llvm-project
that referenced
this pull request
Jun 11, 2025
DhruvSrivastavaX
pushed a commit
to DhruvSrivastavaX/lldb-for-aix
that referenced
this pull request
Jun 12, 2025
…tyle consistency (llvm#143113) Following up on a comment on llvm#142355. Updated other instances in the file as well. @jayfoad
DhruvSrivastavaX
pushed a commit
to DhruvSrivastavaX/lldb-for-aix
that referenced
this pull request
Jun 12, 2025
tomtor
pushed a commit
to tomtor/llvm-project
that referenced
this pull request
Jun 14, 2025
…tyle consistency (llvm#143113) Following up on a comment on llvm#142355. Updated other instances in the file as well. @jayfoad
tomtor
pushed a commit
to tomtor/llvm-project
that referenced
this pull request
Jun 14, 2025
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.
Following up on a comment on #142355.
Updated other instances in the file as well.
@jayfoad