[PATCH] Remove CloneFunction VMap
Tobias Edler von Koch
tobias at codeaurora.org
Fri Apr 24 10:49:39 PDT 2015
I have a downstream pass using this, but it's not a big deal because
it's possible to replicate the old behavior by creating a new
function yourself and then using CloneFunctionInto, which lets you remap
Perhaps it might make sense to add something like "Use
CloneFunctionInto if remapping of arguments is required" to the
comment to make it easier for people to figure this out?
On Fri, 24 Apr 2015 10:13:42 -0700 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.
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, a
Linux Foundation Collaborative Project.
More information about the llvm-commits