This is an archive of the discontinued LLVM Phabricator instance.

[Test + comment] Add a regression test to guard the 0 hot-caller threshold, and add comment near the threshold definition.
ClosedPublic

Authored by mingmingl on Apr 25 2022, 8:52 AM.

Details

Reviewers
tejohnson

Diff Detail

Event Timeline

mingmingl created this revision.Apr 25 2022, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 8:52 AM
mingmingl requested review of this revision.Apr 25 2022, 8:52 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 25 2022, 8:52 AM

Thanks! Couple minor suggestions.

llvm/lib/Passes/PassBuilderPipelines.cpp
716

Nit here and in second instance of this comment: I think these lines are well under 80 chars? Can you change the line wrapping to make better use of the full line?

721

Not sure the test reference is needed or wanted here. I would remove that and if anything point to the place in the inline cost handling that shows how we can end up with a negative cost. But probably not necessary - in which case I would combine this with your earlier note "as much as possible" since I think this is the explanation for that aside? I.e. something like "as much as possible as the cost of a function could be negative". Or "as much as possible [1]" and later "[1] Note the cost of a function could be below zero."

llvm/test/Other/new-pm-thinlto-prelink-samplepgo-inline-threshold.ll
8

I think first "is" should be removed (from "is basic block is cold").

mingmingl marked 3 inline comments as done.Apr 25 2022, 11:02 AM

thanks!

llvm/lib/Passes/PassBuilderPipelines.cpp
721

Done by revising to "as much as possible [1]" and later "[1] Note the cost of a function could be below zero." (here and below)

mingmingl marked an inline comment as done.

remove new lines added by editor

Truly removed newlines..

This revision is now accepted and ready to land.Apr 25 2022, 11:22 AM
mingmingl closed this revision.Apr 25 2022, 11:32 AM

It seems that reviews.llvm.org has stopped tracking new origin/main commits and failed to auto close a differential when a commit with Differential Revision: is pushed to origin/main.

Close this manually.