[PATCH] D69561: [ThinLTO] Import readonly vars with refs

Steven Wu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Oct 29 09:58:29 PDT 2019


steven_wu added a comment.

I can see why this is a good idea, but do you have numbers for this optimization? How much code can be inlined? Benchmark for speedup? code size? compile time impact?



================
Comment at: lib/Transforms/IPO/FunctionImport.cpp:282
 
+static bool hasRefsPreventingImport(const GlobalValueSummary *S) {
+  auto *GVS = cast<GlobalVarSummary>(S);
----------------
I will just make function to be type `bool hasRefsPreventingImport(const GlobalVarSummary*);`. The callsite already has `isa` check so it will be much better to type casting there.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D69561/new/

https://reviews.llvm.org/D69561





More information about the llvm-commits mailing list