[PATCH] ArgumentPromotion: Avoid invalidating the IR if a function's second argument is sret.

Peter Collingbourne peter at pcc.me.uk
Wed Jun 10 11:42:30 PDT 2015


> Second, could argpromotion just drop sret in this case? sret does two things: it's equivalent to noalias, and it ensures that the sret pointer is returned in eax. If all uses of the function are internal, dropping sret is conservatively correct and reduces register pressure. We don't leverage that eax return because it would be an ABI break with old LLVMs, so we can replace sret with noalias without losing any power.


I agree, that seems like a much better solution.


http://reviews.llvm.org/D10353

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list