[PATCH] Remove CloneFunction VMap
Rafael Espíndola
rafael.espindola at gmail.com
Fri Apr 24 11:02:14 PDT 2015
While at it, can you remove the duplicated name from the comments?
To make this less error prone, how about removing the argument and
returning a std::pair<VMap, Function*>?
On 24 April 2015 at 13:13, Pete Cooper <peter_cooper at apple.com> wrote:
> 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
More information about the llvm-commits
mailing list