[llvm] [SelectionDAG] Use uintptr_t for ResNo in SDValue. (PR #104660)

via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 16 19:48:05 PDT 2024


llvmbot wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-llvm-selectiondag

Author: Craig Topper (topperc)

<details>
<summary>Changes</summary>

This uses up the padding bytes at the end of SDValue on 64-bit hosts.

This reduces compile and binary size according to these results https://llvm-compile-time-tracker.com/compare.php?from=6e0fc155782ff5307245a85c7b037a2998ec6c86&to=75ea202907d75e9e5362c487466e956036beeefc&stat=instructions:u

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


1 Files Affected:

- (modified) llvm/include/llvm/CodeGen/SelectionDAGNodes.h (+1-1) 


``````````diff
diff --git a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
index 2f36c2e86b1c3..dc3bb63580bd2 100644
--- a/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
+++ b/llvm/include/llvm/CodeGen/SelectionDAGNodes.h
@@ -146,7 +146,7 @@ class SDValue {
   friend struct DenseMapInfo<SDValue>;
 
   SDNode *Node = nullptr; // The node defining the value we are using.
-  unsigned ResNo = 0;     // Which return value of the node we are using.
+  uintptr_t ResNo = 0;       // Which return value of the node we are using.
 
 public:
   SDValue() = default;

``````````

</details>


https://github.com/llvm/llvm-project/pull/104660


More information about the llvm-commits mailing list