[llvm] [CodeGen][ShrinkWrap] Clarify StackAddressUsedBlockInfo meaning (PR #80679)

Elizaveta Noskova via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 15 01:36:30 PST 2024


================
@@ -161,9 +161,9 @@ class ShrinkWrap : public MachineFunctionPass {
   /// Current MachineFunction.
   MachineFunction *MachineFunc = nullptr;
 
-  /// Is `true` for block numbers where we can guarantee no stack access
-  /// or computation of stack-relative addresses on any CFG path including
-  /// the block itself.
+  /// Is `true` for the block numbers where we cannot guarantee that there will
+  /// be no access to the stack or computation of stack-relative addresses on
+  /// any CFG path including the block itself.
----------------
enoskova-sc wrote:

I agree that after my changes comment looks too complicated.
Nevertheless if I simply drop `no` from the original comment, we'll get
```
  /// Is `true` for block numbers where we can guarantee stack access
  /// or computation of stack-relative addresses on any CFG path including
  /// the block itself.
  ```
which means, what we are sure that there will be access to the stack or computation of stack-relative addresses. But really we only assume it.
May be it will be better to write
```
  /// Is `true` for block numbers where we assume possible stack access
  /// or computation of stack-relative addresses on any CFG path including
  /// the block itself.
  ```

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


More information about the llvm-commits mailing list