Probe-based profile leads to a better performance when combined with profi and ext-tsp block layout. I'm turning them on by default.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
| llvm/lib/Transforms/IPO/SampleProfile.cpp | ||
|---|---|---|
| 2036–2043 | I would structure it slightly differently.. if (Reader->profileIsCSFlat() || Reader->profileIsCSNested() || Reader->profileIsProbeBased()) {
// Enable iterative-BFI by default for CSSPGO.
if (!UseIterativeBFIInference.getNumOccurrences())
UseIterativeBFIInference = true;
// Enable Profi by default for CSSPGO.
if (!SampleProfileUseProfi.getNumOccurrences())
SampleProfileUseProfi = true;
// Enable EXT-TSP block layout for CSSPGO.
if (!EnableExtTspBlockPlacement.getNumOccurrences())
EnableExtTspBlockPlacement = true;
}
else if (Reader->profileIsCSNested() || Reader->profileIsProbeBased()) {
...
} | |
| llvm/lib/Transforms/IPO/SampleProfile.cpp | ||
|---|---|---|
| 2036–2043 | Sounds good without the else. | |
I would structure it slightly differently..
if (Reader->profileIsCSFlat() || Reader->profileIsCSNested() || Reader->profileIsProbeBased()) { // Enable iterative-BFI by default for CSSPGO. if (!UseIterativeBFIInference.getNumOccurrences()) UseIterativeBFIInference = true; // Enable Profi by default for CSSPGO. if (!SampleProfileUseProfi.getNumOccurrences()) SampleProfileUseProfi = true; // Enable EXT-TSP block layout for CSSPGO. if (!EnableExtTspBlockPlacement.getNumOccurrences()) EnableExtTspBlockPlacement = true; } else if (Reader->profileIsCSNested() || Reader->profileIsProbeBased()) { ... }