[LLVMdev] [patch] mergefunc struct result

Carlo Kok ck at remobjects.com
Fri Apr 18 05:19:12 PDT 2014


When using the merge func pass with two functions that return the same  
kind of struct but with different element types merge func tries to do a  
bitcast of struct to struct.

%kv1 = type { i32*, i32* }
%kv2 = type { i8*, i8* }

define %kv1 @fn1() {
...
}

define %kv2 @fn2() {
..
}

The attached patch checks for two struct types & uses insert/extract to  
create the right record.


-- 
Carlo Kok
RemObjects Software
-------------- next part --------------
A non-text attachment was scrubbed...
Name: llvm-mergefunc-struct-result.diff
Type: application/octet-stream
Size: 1149 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20140418/36179f05/attachment.obj>


More information about the llvm-dev mailing list