ncharlie added a comment. Ah, I think I realized what the entryNode should be: I should topologically sort the nodes in the ModuleSummaryIndex and take the first FunctionSummary. Right now the entry node is arbitrary. https://reviews.llvm.org/D36311