[PATCH] Remove CloneFunction VMap

Pete Cooper peter_cooper at apple.com
Fri Apr 24 10:13:42 PDT 2015


Hi Rafael

The method llvm::CloneFunction takes a VMap in which "any references specified in the VMap are changed to refer to their mapped value instead of the original one".

However, all callers of this function (AMDGPUAlwaysInlinePass, clang’s CGVTables, and PartialInlining) never make use of this functionality.  That is, they always pass an empty map.

Attached is a patch which removes the ability for this method to rewrite arguments, and asserts that no-one tries to.  The function comment has been updated to state this.

This also exposed some code cleanup due to the function types of the old and new functions being the same.

Cheers,
Pete
-------------- next part --------------
A non-text attachment was scrubbed...
Name: clone.diff
Type: application/octet-stream
Size: 4342 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150424/08374817/attachment.obj>


More information about the llvm-commits mailing list