llvm-project/llvm/test/Transforms/SampleProfile
Hongtao Yu ac068e014b [CSSPGO] Consume pseudo-probe-based AutoFDO profile
This change enables pseudo-probe-based sample counts to be consumed by the sample profile loader under the regular `-fprofile-sample-use` switch with minimal adjustments to the existing sample file formats. After the counts are imported, a probe helper, aka, a `PseudoProbeManager` object, is automatically launched to verify the CFG checksum of every function in the current compilation against the corresponding checksum from the profile. Mismatched checksums will cause a function profile to be slipped. A `SampleProfileProber` pass is scheduled before any of the `SampleProfileLoader` instances so that the CFG checksums as well as probe mappings are available during the profile loading time. The `PseudoProbeManager` object is set up right after the profile reading is done. In the future a CFG-based fuzzy matching could be done in `PseudoProbeManager`.

Samples will be applied only to pseudo probe instructions as well as probed callsites once the checksum verification goes through. Those instructions are processed in the same way that regular instructions would be processed in the line-number-based scenario. In other words, a function is processed in a regular way as if it was reduced to just containing pseudo probes (block probes and callsites).

**Adjustment to profile format **

A CFG checksum field is being added to the existing AutoFDO profile formats. So far only the text format and the extended binary format are supported. For the text format, a new line like
```
!CFGChecksum: 12345
```
is added to the end of the body sample lines. For the extended binary profile format, we introduce a metadata section to store the checksum map from function names to their CFG checksums.

Differential Revision: https://reviews.llvm.org/D92347
2020-12-16 15:57:18 -08:00
..
Inputs [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
branch.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
calls.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
cold-indirect-call.ll
compressed-profile-symbol-list.ll
cov-zero-samples.ll
coverage-warning.ll
discriminator.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
early-inline.ll
entry_counts.ll
entry_counts_cold.ll Make CallInst::updateProfWeight emit i32 weights instead of i64 2020-11-24 18:13:59 -08:00
entry_counts_missing_dbginfo.ll
flattened.ll [test][NewPM][SampleProfile] Fix more tests under NPM 2020-09-30 11:50:41 -07:00
fnptr.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
function_metadata.ll [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
gcc-simple.ll
indirect-call-gcc.ll
indirect-call.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
inline-act.ll
inline-callee-update.ll
inline-cold-callsite-samplepgo.ll
inline-cold.ll
inline-combine.ll
inline-coverage.ll
inline-mergeprof-dup.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
inline-mergeprof.ll Make CallInst::updateProfWeight emit i32 weights instead of i64 2020-11-24 18:13:59 -08:00
inline-replay.ll
inline-stats.ll
inline-topdown.ll
inline.ll
nodebug-error.ll
nodebug.ll
nolocinfo.ll
offset.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
profile-context-tracker-debug.ll [CSSPGO] Infrastructure for context-sensitive Sample PGO and Inlining 2020-12-06 11:49:18 -08:00
profile-context-tracker.ll [CSSPGO] Infrastructure for context-sensitive Sample PGO and Inlining 2020-12-06 11:49:18 -08:00
profile-format-compress.ll Revert "Use uint64_t for branch weights instead of uint32_t" 2020-10-31 00:25:32 -07:00
profile-format.ll [SampleFDO] Store fixed length MD5 in NameTable instead of using ULEB128 if 2020-12-08 16:21:01 -08:00
profile-sample-accurate.ll [test][NewPM][SampleProfile] Fix more tests under NPM 2020-09-30 11:50:41 -07:00
propagate.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
pseudo-probe-emit-inline.ll [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
pseudo-probe-emit.ll [CSSPGO] Pseudo probe encoding and emission. 2020-12-10 17:29:28 -08:00
pseudo-probe-profile.ll [CSSPGO] Consume pseudo-probe-based AutoFDO profile 2020-12-16 15:57:18 -08:00
pseudo-probe.mir [CSSPGO] MIR target-independent pseudo instruction for pseudo-probe intrinsic 2020-11-20 10:52:43 -08:00
remap-2.ll
remap.ll [test][SampleProfile][NewPM] Fix some tests under NPM 2020-09-30 09:44:29 -07:00
remarks-hotness.ll [Remarks][2/2] Expand remarks hotness threshold option support in more tools 2020-11-30 21:55:50 -08:00
remarks.ll
section-accurate-samplepgo.ll [CodeGen] Add text section prefix for COFF object file 2020-12-08 18:56:21 +08:00
summary.ll
syntax.ll
uncompressed-profile-symbol-list.ll
use-sample-profile-attr.ll
warm-inline-instance.ll