[PATCH] D35436: [ThinLTO] Ensure we always select the same function copy to import

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Jul 14 13:12:36 PDT 2017


tejohnson created this revision.
Herald added a subscriber: inglorion.

Check if the first eligible callee is under the instruction threshold.
Checking this on the first eligible callee ensures that we don't end
up selecting different callees to import when we invoke this routine
with different thresholds due to reaching the callee via paths that
are shallower or hotter (when there are multiple copies, i.e. with
weak or linkonce linkage). We don't want to leave the decision of which
copy to import up to the backend.


https://reviews.llvm.org/D35436

Files:
  lib/Transforms/IPO/FunctionImport.cpp
  test/Transforms/FunctionImport/Inputs/funcimport_resolved1.ll
  test/Transforms/FunctionImport/Inputs/funcimport_resolved2.ll
  test/Transforms/FunctionImport/funcimport_resolved.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35436.106696.patch
Type: text/x-patch
Size: 6051 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170714/ed024343/attachment.bin>


More information about the llvm-commits mailing list