================ ---------------- mmjjpp wrote:
The M.getFunction(newFn->getName()) lookup was a leftover from an earlier experiment where we tried moving the bitcode serialization/deserialization before CloneModule. In that setup, the GV passed to the callback would have been from a re-parsed module rather than from M, so a name-based lookup back into M was needed to find the original function pointer. Since that approach was not in this pr, the GV passed by CloneModule is already from M, and FnToClone is already a const Function * in M that can be directly checked against FnsInPart. I've removed the redundant lookup and simplified it to return FnsInPart.contains(FnToClone). https://github.com/llvm/llvm-project/pull/198702 _______________________________________________ cfe-commits mailing list [email protected] https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
