[PATCH] D114545: [CodeGen] Async unwind - add a pass to fix CFI information

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Mar 25 23:08:42 PDT 2022


MaskRay accepted this revision.
MaskRay added inline comments.


================
Comment at: llvm/lib/CodeGen/CFIFixup.cpp:181
+#endif
+    if (!Info.StrongNoFrameOnEntry && Info.HasFrameOnEntry && !HasFrame) {
+      // Reset to the "after prologue" state.
----------------
Super nit: `if (!HasFrame && Info.HasFrameOnEntry && !Info.StrongNoFrameOnEntry) {`

HasFrame represents the previous state and Info.HasFrameOnEntry represents the current state. The order implies a state transition.

---

The term "Reset" seems to imply transiting to the initial state.

"Transit to" may be better. To describe `!HasFrame` as well, the comment is better changed to something like `Transit from ... state to ... state`.


================
Comment at: llvm/lib/CodeGen/CFIFixup.cpp:199
+      Change = true;
+    } else if (!Info.HasFrameOnEntry && HasFrame) {
+      // Reset to the state upon function entry.
----------------
Similarly, `HasFrame && !Info.HasFrameOnEntry`


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D114545/new/

https://reviews.llvm.org/D114545



More information about the llvm-commits mailing list