[llvm] [CFIFixup] Factor logic into helpers and use range-based loops (NFC) (PR #125137)

Momchil Velikov via llvm-commits llvm-commits at lists.llvm.org
Fri Jan 31 01:33:29 PST 2025


================
@@ -122,6 +123,57 @@ findPrologueEnd(MachineFunction &MF, MachineBasicBlock::iterator &PrologueEnd) {
   return nullptr;
 }
 
+// Represents a basic block's relationship to the call frame. This metadata
+// reflects what the state *should* be, which may differ from the actual state
+// after final machine basic block layout.
+struct BlockFlags {
+  bool Reachable : 1;
+  bool StrongNoFrameOnEntry : 1;
+  bool HasFrameOnEntry : 1;
+  bool HasFrameOnExit : 1;
+};
+
+// Computes the frame information for each block in the function. Frame info
+// for a block is inferred from its predecessors.
+SmallVector<BlockFlags>
----------------
momchil-velikov wrote:

`static` ?

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


More information about the llvm-commits mailing list