[PATCH] D80579: [llvm] Add function feature extraction analysis

Johannes Doerfert via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 26 22:18:27 PDT 2020


jdoerfert added inline comments.


================
Comment at: llvm/include/llvm/Analysis/ML/InlineFeaturesAnalysis.h:32
+    int64_t DirectCallsToDefinedFunctions = 0;
+  };
+  Result run(const Function &F, FunctionAnalysisManager &FAM);
----------------
mtrofin wrote:
> jdoerfert wrote:
> > Nit: We now count `Uses`, not `Users`.
> > Nit: `uint64_t` as all are counts.
> Done the rename part. 
> 
> Re. signedness / unsignedness: initially, I had them as size_t, but:
> - tensorflow works with signed values, and it is the main consumer of this data
> - one other use in the (next CL) MLInlineAdvisor is to delta-update some module-wide values (like total nr of edges in a module). With uint64_t, we need to be very careful with how that update happens (subtractions can silently overflow).
> 
> With signed int, that's not a problem.
Fair enough. 


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80579





More information about the llvm-commits mailing list