[PATCH] D145644: [memprof] Add scripts to automate testdata regeneration.

Teresa Johnson via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Mar 9 11:04:23 PST 2023


tejohnson added a comment.

Generally lgtm, but why did the raw profiles change size from what is currently committed?



================
Comment at: llvm/test/Transforms/PGOProfile/Inputs/update_memprof_inputs.sh:63
+  delete[] f;
+
+  // Loop ensures the two calls to recurse have stack contexts that only differ
----------------
snehasish wrote:
> @tejohnson Turns out the LLVM IR matching issue was due to a difference in the code from which the IR was generated. The one in the comments has a line offset of 30 from `main` to the callsite of `recurse` whereas the memprof.ll IR expects a line offset of 31. Perhaps a comment or blank line was omitted? I added a blank line here and added a comment in the update script too. 
Hmm, yeah its definitely possible that when the code got copied in a blank line was inadvertently cut.


================
Comment at: llvm/test/tools/llvm-profdata/Inputs/update_memprof_inputs.sh:14
+
+read -r -d '' SRC1 << EOF
+#include <stdlib.h>
----------------
Maybe name these more clearly, like BASIC instead of SRC1, etc?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D145644



More information about the llvm-commits mailing list