[PATCH] Teach DeadArgElimination not to eliminate return values of functions with 'returned' arguments

Stephen Lin swlin at post.harvard.edu
Tue Jun 25 16:44:30 PDT 2013


> Also, the implementation on ARM treats 'returned' on the first
> argument as somewhat like a pseudo calling convention (which a hack
> because the current code does not allow a calling convention to save a
> register used to pass an argument.) but that's only because the two
> happen to be in the same register, but in the general case it's not
> that simple. Even on ARM, the implementation is not as simple as
> treating R0 as a "saved" register (that happens to also be an
> argument), because the variable being saved may be smaller than the
> register, in which case the semantics of 'returned' specifies only
> that the bits used by that type (rather than the entire argument) are
> saved.

"rather than the entire *register*" I mean...



More information about the llvm-commits mailing list