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.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Unfortunately I had to revert this in r308206. A ThinLTO bot was failing with a linker undefined reference error:
http://green.lab.llvm.org/green/job/clang-stage2-configure-Rthinlto_build/3663/
It seems unlikely that this heuristic change would directly cause that, but I don't have time to dig into it at the moment. Hopefully it is reproducible with lld or gold (this was ld64 on Darwin). I am not sure if I will have much time to spend looking into it this week, unfortunately.