This is an archive of the discontinued LLVM Phabricator instance.

[CSPGO][CHR] Disable CHR in ThinLTOPostLink mode
AbandonedPublic

Authored by xur on Feb 6 2023, 8:34 PM.

Details

Summary

Disable CHR in ThinLTOPostLink pipeline. In the previous commit 6327d263f5e2a: [CHR] Add a threshold for the code duplication,
I disabled CHR for CSIRInstr in ThinLTOPostLink. That change creates profile mismatch issues in CSFDO profile use compilation.

Here I disable CHR for ThinLTOPostLink. We have an earlier round of CHR and I don't think we need this round CHR here.

I think the better place for CHR would be in ModuleOptimization pipeline after CSFDO because CHR is an expensive optimization. I will have a follow-up patch for that after some performance test.

Diff Detail

Event Timeline

xur created this revision.Feb 6 2023, 8:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2023, 8:34 PM
xur requested review of this revision.Feb 6 2023, 8:34 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 6 2023, 8:34 PM

There is a related patch by Arthur: https://reviews.llvm.org/D143424. Can that patch solve the problem?

davidxl edited reviewers, added: tejohnson, aeubanks; removed: davidxl.Feb 6 2023, 9:07 PM
davidxl added a subscriber: davidxl.
xur added a comment.Feb 6 2023, 9:25 PM

Yes. D143424 is actually what I wanted to do in the following up patch. We need to do some performance test though.

is this now obsolete?

xur abandoned this revision.Mar 1 2023, 10:46 AM

Yes. This patch is obsolete now.