[PATCH] D29320: [XRay] A tool for Comparing xray function call graphs

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 1 10:06:55 PST 2017


dblaikie added a comment.

Few drive by comments



================
Comment at: tools/llvm-xray/xray-graph-diff.cc:351
+               G.EdgeMaxDiff.second.getDouble(T)));
+  if (MR == 0.0 && R == 0.0){
+    MR = 1.0;
----------------
dblaikie wrote:
> Usually skip {} on single line blocks
missing space between ')' and '{'


================
Comment at: tools/llvm-xray/xray-graph-diff.cc:351-353
+  if (MR == 0.0 && R == 0.0){
+    MR = 1.0;
+  }
----------------
Usually skip {} on single line blocks


================
Comment at: tools/llvm-xray/xray-graph-diff.cc:417-419
+  if(A.getPosition() == 0 && AA.getPosition() == 0){
+    return B;
+  }
----------------
Unnecessary {} and/or missing space (between ')' and '{')


================
Comment at: tools/llvm-xray/xray-graph-diff.h:73
+
+  const GraphT &getGraph(){
+    return G;
----------------
missing space between '()' and '{'


================
Comment at: tools/llvm-xray/xray-graph-diff.h:75
+    return G;
+  };
+};
----------------
spurious semicolon


================
Comment at: tools/llvm-xray/xray-graph.h:52
+
+    TimeStat(): TimeStat(0,0,0,0,0,0,0){};
+    TimeStat(int64_t _Count,
----------------
Spurious semicolon


https://reviews.llvm.org/D29320





More information about the llvm-commits mailing list