[PATCH] D88536: [clangd] Split DecisionForest Evaluate() into one func per tree.

Utkarsh Saxena via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 30 11:24:37 PDT 2020


usaxena95 added inline comments.


================
Comment at: clang-tools-extra/clangd/quality/CompletionModelCodegen.py:168
+        nline.join(class_members),
+        nline.join(["  float EvaluateTree%d() const;" % tree_num
+                    for tree_num in range(num_trees)]),
----------------
adamcz wrote:
> Why are these member functions? Why not keep them in .cc file only, in anonymous namespace?
> 
> I wonder if that will make compiler inline them and then bring back msan issues though.
> Why are these member functions? Why not keep them in .cc file only, in anonymous namespace?

We will need to add getters for member variables (hoping they would be inlined). 
SG ?
(Or make the members public o_O ?)

> I wonder if that will make compiler inline them and then bring back MSAN issues though.
 
I think we can disable that using  `LLVM_ATTRIBUTE_NOINLINE`



Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D88536



More information about the cfe-commits mailing list