[PATCH] D99815: [CSSPGO][Test] XFAIL profile-context-tracker-debug.ll on AIX

Hongtao Yu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 12 14:31:23 PDT 2021


hoy added a comment.

In D99815#2683075 <https://reviews.llvm.org/D99815#2683075>, @jsji wrote:

> So this is not only failing for AIX, it is actually depends on the libc++ implementation.  It may fail on Linux if using non default libc++ .
>
> Any plan of fixing the code to not using std::hash<std::string> ? Thanks. @hoy

Thanks for pointing it out. Yes, we think that may be related to libstdc++ function `_Hash_bytes`. My plan is to tweak the test with Check-DAG since the promoting order of the children should not cause codegen diffs. We could also sort the children by names instead of hash value for a more stable order across platforms, but that''ll likely incur more overhead. What do you think?

  namespace std
  {
  _GLIBCXX_BEGIN_NAMESPACE_VERSION
  
    // Hash function implementation for the nontrivial specialization.
    // All of them are based on a primitive that hashes a pointer to a
    // byte array. The actual hash algorithm is not guaranteed to stay
    // the same from release to release -- it may be updated or tuned to
    // improve hash quality or speed.
    size_t
    _Hash_bytes(const void* __ptr, size_t __len, size_t __seed);


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99815



More information about the llvm-commits mailing list