Restore "[MemProf] Memprof profile matching and annotation"
authorTeresa Johnson <tejohnson@google.com>
Fri, 23 Sep 2022 13:43:07 +0000 (06:43 -0700)
committerTeresa Johnson <tejohnson@google.com>
Fri, 23 Sep 2022 18:38:47 +0000 (11:38 -0700)
commitb1926f308f0939b365ee4940c7b1bd984b45e71a
tree5f286abdcff97723c4568ef0e019ba9a44bcee22
parent79565766be94f7944278671a9f473d79ac18f7e1
Restore "[MemProf] Memprof profile matching and annotation"

This reverts commit 794b7ea960ccc3222f2af582efadbc5e5c464292, and
thus restores commit a212d8da94d08e229aa8d65283e4b116310bba10, and
follow on fixes 0cd6763fa93159b84d70a5bb602c24996acaafaa,
e9ff53d42feac7fc157718523275619a8106f2f3, and
37c6a25e9ab230e5e21fa34e246d9fec55275df0.

Use a hash function (BLAKE3) instead of hash_combine/hash_code which are
not guaranteed to be stable across executions.

Additionally, it adds a "REQUIRES: x86_64-linux" to the tests that have
raw profile inputs to avoid failures on big endian bots.

Reviewers: snehasish, davidxl

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D128142
13 files changed:
clang/lib/Frontend/CompilerInvocation.cpp
clang/test/CodeGen/Inputs/memprof.exe [new file with mode: 0755]
clang/test/CodeGen/Inputs/memprof.memprofraw [new file with mode: 0644]
clang/test/CodeGen/memprof.cpp [new file with mode: 0644]
llvm/include/llvm/Analysis/MemoryBuiltins.h
llvm/include/llvm/ProfileData/InstrProfReader.h
llvm/lib/Analysis/MemoryBuiltins.cpp
llvm/lib/Transforms/Instrumentation/PGOInstrumentation.cpp
llvm/test/Transforms/PGOProfile/Inputs/memprof.exe [new file with mode: 0755]
llvm/test/Transforms/PGOProfile/Inputs/memprof.memprofraw [new file with mode: 0644]
llvm/test/Transforms/PGOProfile/Inputs/memprof_pgo.profraw [new file with mode: 0644]
llvm/test/Transforms/PGOProfile/memprof.ll [new file with mode: 0644]
llvm/test/Transforms/PGOProfile/memprofmissingfunc.ll [new file with mode: 0644]