On Jun 16, 2014, at 3:56 AM, Bernd Schmidt <ber...@codesourcery.com> wrote: > For the ptx port, I've needed to write a new pass which ensures all objects > go into address spaces as required by the machine.
I have such a machine and I’ve always approached the problem from the front end side. I ensure the right space up front, and if someone doesn’t get the right space, I add code to let the port choose the space for that object (literal constants I wanna play around with some for example). On my port there is no changing spaces once one is selected. I’m curious if your port needs to change a space (and why, I’m wondering if I can improve my port by changing spaces)? One known issue for my port is if I run out of memory in one space, I don’t magically fall over to another space, but rather just fail. The other is space selection for the stack. I let it default, and then during operand printing I select the space I’ve chosen for the default. The scheduling is complicated as I have to handle two spaces (normal, plus default), instead of just one.