[NVPTX][NFC] Update NVPTXLowerAlloca comments to use opaque pointer syntax#190573
Open
balaji-krishna-atukuri wants to merge 1 commit intollvm:mainfrom
Open
[NVPTX][NFC] Update NVPTXLowerAlloca comments to use opaque pointer syntax#190573balaji-krishna-atukuri wants to merge 1 commit intollvm:mainfrom
balaji-krishna-atukuri wants to merge 1 commit intollvm:mainfrom
Conversation
…yntax Modernize the header comment IR examples to use opaque pointer syntax (ptr instead of i32*, i32 addrspace(5)*, etc.), matching the LLVM-wide move to opaque pointers in LLVM 17+. Also fix a grammar issue in the comment.
Member
|
@llvm/pr-subscribers-backend-nvptx Author: Balaji Krishna Yugandhar Atukuri (balaji-krishna-atukuri) ChangesModernize the header comment IR examples in Also fix a grammar issue: "For all alloca instructions, and add a pair of cast" → "For all alloca instructions, add a pair of casts". Comment-only change, no functional impact. Full diff: https://github.com/llvm/llvm-project/pull/190573.diff 1 Files Affected:
diff --git a/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp b/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
index 1583d45eeb3a6..2262decfc3c76 100644
--- a/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
+++ b/llvm/lib/Target/NVPTX/NVPTXLowerAlloca.cpp
@@ -6,18 +6,18 @@
//
//===----------------------------------------------------------------------===//
//
-// For all alloca instructions, and add a pair of cast to local address for
+// For all alloca instructions, add a pair of casts to local address for
// each of them. For example,
//
// %A = alloca i32
-// store i32 0, i32* %A ; emits st.u32
+// store i32 0, ptr %A ; emits st.u32
//
// will be transformed to
//
// %A = alloca i32
-// %Local = addrspacecast i32* %A to i32 addrspace(5)*
-// %Generic = addrspacecast i32 addrspace(5)* %A to i32*
-// store i32 0, i32 addrspace(5)* %Generic ; emits st.local.u32
+// %Local = addrspacecast ptr %A to ptr addrspace(5)
+// %Generic = addrspacecast ptr addrspace(5) %Local to ptr
+// store i32 0, ptr %Generic ; emits st.local.u32
//
// And we will rely on NVPTXInferAddressSpaces to combine the last two
// instructions.
|
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.
Modernize the header comment IR examples in
NVPTXLowerAlloca.cppto use opaque pointer syntax (ptrinstead ofi32*,i32 addrspace(5)*, etc.), matching the LLVM-wide move to opaque pointers in LLVM 17+.Changes:
i32*,i32 addrspace(5)*) to opaque pointer syntax (ptr,ptr addrspace(5))addrspacecastwas using%A(the alloca result) instead of%Local(the result of the first addrspacecast to local address space)Flow:
IR (comment fix — before vs after):
Files changed: 1 file, +5/-5 lines
Comment-only change, no functional impact.