13:41:18drmeisterI just need to subclass JITLinkMemoryManager to allocate in AMS.
13:42:17drmeisterAfter loading the image I'll walk memory, and for each ObjectFile_O I'll add it to the LLJIT and it will again allocate memory in the AMS pool.
13:43:06drmeisterImage save just needs to write out the literals that are in the AMS pool and replace them after the code is recreated in the AMS pool.
13:43:34drmeisterI can choose to have a simple vector of literals or I could get fancy and put the literals directly into the code and have a table of offsets for fixup.
13:43:57drmeisterSo, here is a question, how much better would it be to put the literals directly into the code?
13:44:08drmeisterCurrently we access literals using RIP-relative addressing.
13:44:47drmeisterI think putting them directly into the code would give the ultimate in performance. It's what sbcl does.