[PATCH] Implement Named Register Global Variables in LLVM

Rafael Ávila de Espíndola rafael.espindola at gmail.com
Fri May 2 11:21:17 PDT 2014


Can you explicitly check for allocatable registers? That should let us include a test showing that eax (for example) is rejected with a message saying it is an allocatable register. That would be a nice safety if future developments use tablegen to find the register.

I am still not convinced of the value of the "stack" pseudo register. All current use cases we want this for already use an explicit register name when being compiled with gcc, no? Can we at least start without it? These things are far easier to add than to remove.

================
Comment at: docs/LangRef.rst:6836
@@ +6835,3 @@
+
+Pointer types are used to make sure it has the same bit width as the
+register itself.
----------------
Out of date comment.

================
Comment at: docs/LangRef.rst:6843
@@ +6842,3 @@
+
+The behaviour of the program when the register is used by interleaving
+code is unspecified.
----------------
Not sure what exactly these two paragraphs mean. It would probably be best to just say that

* Allocatable registers are rejected.
* The compiler does no extra checking than what would be available in an inline assembly statement.

================
Comment at: docs/LangRef.rst:6887
@@ +6886,3 @@
+
+The behaviour of the program when the register is used by interleaving
+code is unspecified.
----------------
Just say that the same restrictions form llvm.read_register apply so they don't get out of sync.

http://reviews.llvm.org/D3261






More information about the llvm-commits mailing list