[PATCH] D103041: [SampleFDO] New hierarchical discriminator for FS SampleFDO (ProfileData part)

Rong Xu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed May 26 17:56:27 PDT 2021


xur updated this revision to Diff 348136.
xur marked an inline comment as done.
xur added a comment.

Integrated review comments from Hongtao and Weilei.

@Wei: I had to add back the special check for N==31 in getN1Bits().
My stock g++, gcc version 10.2.1 20210110 (Debian 10.2.1-6+build2)
folds "(1U << (N + 1)) - 1" to 0.

I think this is a gcc bug.

With this code check, the test case will break.


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

https://reviews.llvm.org/D103041

Files:
  llvm/include/llvm/CodeGen/MIRFSDiscriminator.h
  llvm/include/llvm/CodeGen/Passes.h
  llvm/include/llvm/IR/DebugInfoMetadata.h
  llvm/include/llvm/ProfileData/SampleProf.h
  llvm/include/llvm/ProfileData/SampleProfReader.h
  llvm/include/llvm/Support/Discriminator.h
  llvm/lib/CodeGen/MIRFSDiscriminator.cpp
  llvm/lib/CodeGen/TargetPassConfig.cpp
  llvm/lib/ProfileData/SampleProf.cpp
  llvm/lib/ProfileData/SampleProfReader.cpp
  llvm/lib/ProfileData/SampleProfWriter.cpp
  llvm/lib/Target/X86/X86InsertPrefetch.cpp
  llvm/lib/Transforms/IPO/SampleProfile.cpp
  llvm/test/Transforms/SampleProfile/Inputs/fsafdo.extbinary.afdo
  llvm/test/Transforms/SampleProfile/Inputs/fsafdo.prof
  llvm/test/Transforms/SampleProfile/fsafdo_test.ll
  llvm/unittests/ProfileData/SampleProfTest.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D103041.348136.patch
Type: text/x-patch
Size: 31596 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210527/16a4b1ef/attachment.bin>


More information about the llvm-commits mailing list