[PATCH] ArgumentPromotion: Avoid invalidating the IR if a function's second argument is sret.
Peter Collingbourne
peter at pcc.me.uk
Tue Jun 9 19:31:36 PDT 2015
Hi rnk,
If the first argument to a function is a 'this' argument and the second
has the sret attribute, the ArgumentPromotion pass may promote the 'this'
argument to more than one argument, violating the IR constraint that 'sret'
may only be applied to the first or second argument. To avoid this, keep
track of the location of the argument and always move it to the front of
the argument list during promotion.
http://reviews.llvm.org/D10353
Files:
lib/IR/Function.cpp
lib/Transforms/IPO/ArgumentPromotion.cpp
test/Transforms/ArgumentPromotion/sret.ll
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10353.27423.patch
Type: text/x-patch
Size: 7780 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150610/3bc72b16/attachment.bin>
More information about the llvm-commits
mailing list