Skip to content

Conversation

@arsenm
Copy link
Contributor

@arsenm arsenm commented Apr 18, 2025

No description provided.

Copy link
Contributor Author

arsenm commented Apr 18, 2025

This stack of pull requests is managed by Graphite. Learn more about stacking.

@arsenm arsenm marked this pull request as ready for review April 18, 2025 19:22
@llvmbot
Copy link
Member

llvmbot commented Apr 18, 2025

@llvm/pr-subscribers-backend-nvptx

Author: Matt Arsenault (arsenm)

Changes

Full diff: https://github.com/llvm/llvm-project/pull/136351.diff

1 Files Affected:

  • (modified) llvm/lib/Target/NVPTX/NVVMReflect.cpp (+1-1)
diff --git a/llvm/lib/Target/NVPTX/NVVMReflect.cpp b/llvm/lib/Target/NVPTX/NVVMReflect.cpp
index 30b522efa4361..208bab52284a3 100644
--- a/llvm/lib/Target/NVPTX/NVVMReflect.cpp
+++ b/llvm/lib/Target/NVPTX/NVVMReflect.cpp
@@ -138,7 +138,7 @@ bool NVVMReflect::handleReflectFunction(Module &M, StringRef ReflectName) {
   assert(F->getReturnType()->isIntegerTy() &&
          "_reflect's return type should be integer");
 
-  const bool Changed = F->getNumUses() > 0;
+  const bool Changed = !F->use_empty();
   for (User *U : make_early_inc_range(F->users())) {
     // Reflect function calls look like:
     // @arch = private unnamed_addr addrspace(1) constant [12 x i8]

Copy link
Contributor Author

arsenm commented Apr 18, 2025

Merge activity

  • Apr 18, 5:15 PM EDT: A user started a stack merge that includes this pull request via Graphite.
  • Apr 18, 5:19 PM EDT: A user merged this pull request with Graphite.

@arsenm arsenm merged commit 5dcfa61 into main Apr 18, 2025
15 checks passed
@arsenm arsenm deleted the users/arsenm/nvptx/avoid-getNumUses branch April 18, 2025 21:19
IanWood1 pushed a commit to IanWood1/llvm-project that referenced this pull request May 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants