[PATCH] D14914: Add a FunctionImporter helper to perform summary-based cross-module function importing
Teresa Johnson via llvm-commits
llvm-commits at lists.llvm.org
Mon Nov 23 15:29:09 PST 2015
tejohnson added a comment.
LGTM with one issue
================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:91
@@ +90,3 @@
+ /// transively called functions when importing.
+ SmallVector<Function *, 64> Worklist(CalledFunctions.begin(),
+ CalledFunctions.end());
----------------
I just hit an issue with the earlier version of this patch I had downloaded and modified to store a worklist of Function pointers instead, and a slightly modified test case. The module linker may replace the dest module Function (erasing it from the parent) if it creates a new GV while linking global value protos. It might do this for other declarations it finds in the import module besides the import function. I had forgotten about this, I was dealing with it in my version of the import pass by passing in the structure to update with the new Function. But that is probably overkill. So unfortunately I think we may need to go back to tracking the names of function decls instead of the Function pointers.
http://reviews.llvm.org/D14914
More information about the llvm-commits
mailing list