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

Momchil Velikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 03:18:23 PST 2022


chill marked 5 inline comments as done.
chill added inline comments.


================
Comment at: llvm/lib/CodeGen/CFIFixup.cpp:103
+  struct BlockFlags {
+    bool StrongNoFrameOnEntry : 1;
+    bool HasFrameOnEntry : 1;
----------------
danielkiss wrote:
> NIT, I'm not sure the bitfield here brings anything in terms of performance vs used memory.
It brings 200% reduction in the size of an auxiliary data structure (from 3 to 1 byte) and
we have one entry of these per basic block. At the same time it's extremely cheap
as coding effort (6 key presses :D)  and does not impact readability in any way: if you
delete the bitfields, nothing of the rest of the code needs to change.

Is it a measurable difference? Maybe yes, maybe no, but if no, I will claim the rest of the compiler
is just written in a sloppy and lazy manner :D



================
Comment at: llvm/lib/CodeGen/CFIFixup.cpp:121
+      PrologueBlock = MBB;
+      HasPrologue = true;
+    }
----------------
danielkiss wrote:
> NIT `HasPrologue` maybe better to call `AfterPrologue` since recalculated during the traversal but the function could has a prolog while HasPrologue false.
> HasEpilogue -> AfterEpilog?
It's ok, these two variables pertain only to the block examined in the current iteration of the loop.


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

https://reviews.llvm.org/D114545



More information about the llvm-commits mailing list