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

Stephen Lin swlin at post.harvard.edu
Tue Jun 25 09:42:10 PDT 2013


> Also, just because the return value is unused at the IR level in this case
> doesn't meant it won't ever be used. You could canonicalize the IR to remove
> uses of the return value if you wanted to, but how does a front end express
> code before it is canonicalized?

I should note that the intention is to apply 'returned' to C API
functions like memcpy, etc, whose return values definitely could be in
use by idiomatic front-end code.

Stephen



More information about the llvm-commits mailing list