Marking nodes as addressable
Richard Biener
richard.guenther@gmail.com
Fri Feb 8 08:21:00 GMT 2013
On Fri, Feb 8, 2013 at 2:40 AM, Matt Davis <mattdavis9@gmail.com> wrote:
> I have a GIMPLE_CALL statement and I want to mark the left-hand-side
> value as being addressable (mark_addressable()). I am trying to force
> the result to be stored on the stack, and not in a register. I know
> the return of a call on an 64bit x86 is passed back to the caller in
> the rax register. I want the return value to be immediately moved
> onto the stack from rax after the caller resumes execution. When I do
> mark the LHS of the call as being addressable, the ssa-expansion
> fails, as the updated node is not in the var_partition when
> get_rtx_for_ssa_name() is called. How can I tease the return of a
> caller to be stored on the stack, in a temporary variable, instead of
> lying around in a register, or being passed to other free registers?
It depends on where you are doing that transform. If during GIMPLE
optimization then the only good way is to use a new volatile local decl.
You can create that with create_tmp_var_raw () and set
TREE_THIS_VOLATILE on it.
Richard.
> -Matt
More information about the Gcc
mailing list