diff options
author | Gulfem Savrun Yeniceri <gulfem@google.com> | 2022-08-17 22:17:58 +0000 |
---|---|---|
committer | Gulfem Savrun Yeniceri <gulfem@google.com> | 2022-08-30 19:50:41 +0000 |
commit | 999886325e825747d5aff5c447b20d12fec7b57a (patch) | |
tree | 81280258e5f21e775ca61158d6c25aae104acdd1 /mlir/lib/Transforms/LoopInvariantCodeMotion.cpp | |
parent | 7973346d1672dda58c5ba33918ef38bf707daa42 (diff) | |
download | llvm-999886325e825747d5aff5c447b20d12fec7b57a.zip llvm-999886325e825747d5aff5c447b20d12fec7b57a.tar.gz llvm-999886325e825747d5aff5c447b20d12fec7b57a.tar.bz2 |
[profile] Create only prof header when no counters
When we use selective instrumentation and instrument a file
that is not in the selected files list provided via -fprofile-list,
we generate an empty raw profile. This leads to empty_raw_profile
error when we try to read that profile. This patch fixes the issue by
generating a raw profile that contains only a profile header when
there are no counters and profile data.
A small reproducer for the above issue:
echo "src:other.cc" > code.list
clang++ -O2 -fprofile-instr-generate -fcoverage-mapping
-fprofile-list=code.list code.cc -o code
./code
llvm-profdata show default.profraw
Differential Revision: https://reviews.llvm.org/D132094
Diffstat (limited to 'mlir/lib/Transforms/LoopInvariantCodeMotion.cpp')
0 files changed, 0 insertions, 0 deletions