[llvm] [CodeGen] Replace (Min,Max)CSFrameIndex with flag on frame object [NFCI] (PR #170905)

Philip Reames via llvm-commits llvm-commits at lists.llvm.org
Sat Dec 6 13:56:11 PST 2025


================
@@ -762,6 +766,18 @@ class MachineFrameInfo {
     return Objects[ObjectIdx+NumFixedObjects].isStatepointSpillSlot;
   }
 
+  bool isCalleeSavedObjectIndex(int ObjectIdx) const {
+    assert(unsigned(ObjectIdx + NumFixedObjects) < Objects.size() &&
+           "Invalid Object Idx!");
+    return Objects[ObjectIdx + NumFixedObjects].isCalleeSaved;
+  }
+
+  void setIsCalleeSavedObjectIndex(int ObjectIdx, bool IsCalleeSaved) {
----------------
preames wrote:

Not a bad idea in isolation, but it's not idiomatic with the surrounding code.  I'd rather keep consistency on the various setters.  

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


More information about the llvm-commits mailing list