[PATCH] D56005: [RFC] [LLVM] Allocatable Global Register Variables for ARM

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Feb 21 10:26:18 PST 2019


efriedma added a comment.

Yes, we should error in the backend, regardless of what clang does, in case some other frontend is missing the appropriate diagnostics.

Dynamically allocating memory on the stack requires a frame pointer... although I guess with -fomit-frame-pointer, we could try to choose a register that isn't reserved instead of unconditionally using the platform default.



================
Comment at: lib/Target/ARM/ARMBaseRegisterInfo.cpp:376
+  if (STI.isRRegisterReserved(BasePtr-ARM::R0))
+    return false;
 
----------------
In the case where we have stack realignment and VLAs, what happens?  IIRC we don't have any code to generate an alternate sequence (although I guess that would be theoretically possible to dynamically allocate stack slots that would otherwise require realignment).  Do we print an error message?


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

https://reviews.llvm.org/D56005





More information about the llvm-commits mailing list