Add hotness data to LLVM remarks
This makes sure that if PGO is used, remarks generated using `-Zremark-dir` will include the `Hotness` attribute.
This commit is contained in:
parent
2e6ac7fe5b
commit
93bdc01adf
3 changed files with 25 additions and 0 deletions
|
@ -1967,6 +1967,9 @@ extern "C" void LLVMRustContextConfigureDiagnosticHandler(
|
|||
std::unique_ptr<LLVMRemarkStreamer> LlvmRemarkStreamer;
|
||||
|
||||
if (RemarkFilePath != nullptr) {
|
||||
// Enable PGO hotness data for remarks, if available
|
||||
unwrap(C)->setDiagnosticsHotnessRequested(true);
|
||||
|
||||
std::error_code EC;
|
||||
RemarkFile = std::make_unique<ToolOutputFile>(
|
||||
RemarkFilePath,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue