[PATCH] Simplify format of profile input file.

Chandler Carruth chandlerc at gmail.com
Tue Jan 7 14:48:26 PST 2014


  Looks good, one comment tweak below.


================
Comment at: lib/Transforms/Scalar/SampleProfile.cpp:434-441
@@ +433,10 @@
+
+    // Now read the body. Each line in the function body has this
+    // format:
+    //
+    //    line_offset[.discriminator]: number_of_samples [fn1:num fn2:num ... ]
+    //
+    // See above for an explanation of each field. The body of the
+    // function ends when we reach EOF or when we see the start of the
+    // next function.
+    while (!LineIt.is_at_eof() && isdigit((*LineIt)[0])) {
----------------
I would probably just assume the reader read the introductory comment and condense this as:

  // Now read the body. The body of the function ends when we reach EOF
  // or when we see the start of the next function.


http://llvm-reviews.chandlerc.com/D2419

BRANCH
  master

ARCANIST PROJECT
  llvm



More information about the llvm-commits mailing list