[PATCH] D92669: [PGO] Adjust -vp-counters-per-site.

Raul Tambre via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Dec 14 22:43:12 PST 2020


tambre added a comment.

In D92669#2452831 <https://reviews.llvm.org/D92669#2452831>, @yamauchi wrote:

> I can add "cl::ZeroOrMore" to "-vp-counters-per-site". Would it be good?

Yes, that'd be great!

In D92669#2452831 <https://reviews.llvm.org/D92669#2452831>, @yamauchi wrote:

> I can add "cl::ZeroOrMore" to "-vp-counters-per-site". Would it be good?

I pass the option using `-DCMAKE_CXX_FLAGS_INIT="-mllvm -vp-counters-per-site=2"`, which means it gets added before the one with 1.5.

  Run Build Command(s):/usr/bin/ninja cmTC_353b0 && [1/2] Building C object CMakeFiles/cmTC_353b0.dir/src.c.o
  FAILED: CMakeFiles/cmTC_353b0.dir/src.c.o
  /usr/bin/cc -D_GNU_SOURCE  -g -fdebug-prefix-map=/opt/deb/llvm=. -Wformat -Werror=format-security -O3 -Wdate-time -march=skylake -fsplit-machine-functions -mllvm -vp-counters-per-site=2 -fPIC -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wmissing-field-initializers -pedantic -Wno-long-long -Wimplicit-fallthrough -Wcovered-switch-default -Wdelete-non-virtual-dtor -Wno-comment -Wstring-conversion -fdiagnostics-color -ffunction-sections -fdata-sections -fprofile-generate="/var/tmp/pgo/clang/ir" -Xclang -mllvm -Xclang -vp-counters-per-site=1.5 -flto=thin -DHAVE_DECL__BITSCANFORWARD  -Werror=unguarded-availability-new -MD -MT CMakeFiles/cmTC_353b0.dir/src.c.o -MF CMakeFiles/cmTC_353b0.dir/src.c.o.d -o CMakeFiles/cmTC_353b0.dir/src.c.o -c src.c
  clang (LLVM option parsing): for the --vp-counters-per-site option: may only occur zero or one times!

I don't think that'd result in 2 being used with your proposed fix?

Logically `-vp-counters-per-site` only makes sense to be specified once. I think parameterizing the LLVM CMake code would be better than changing LLVM itself.
Patch: D93281 <https://reviews.llvm.org/D93281>


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D92669



More information about the llvm-commits mailing list