This is an archive of the discontinued LLVM Phabricator instance.

Verifier: check prof branch_weights
ClosedPublic

Authored by yrouban on Apr 26 2019, 3:04 AM.

Details

Summary

There are constraints on !pro branch_weights metadata
https://llvm.org/docs/BranchWeightMetadata.html
It needs to be fixed. As I found in the tests, two more instructions may have !prof branch_weights: Invoke and Select. I'm not sure who should fix the documentation.

This patch is to check some of those constraints.
Several patches are needed to land this patch. See D62122, D62123, D62126.

Diff Detail

Event Timeline

yrouban created this revision.Apr 26 2019, 3:04 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 26 2019, 3:04 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
yrouban retitled this revision from [WIP] Verifier: check prof branch_weights to Verifier: check prof branch_weights.May 20 2019, 8:19 PM
yrouban edited the summary of this revision. (Show Details)
yrouban set the repository for this revision to rG LLVM Github Monorepo.
yrouban edited the summary of this revision. (Show Details)May 20 2019, 8:24 PM
reames accepted this revision.Jun 12 2019, 3:31 PM

LGTM w/a caveat. I fully expect that landing this would expose lots of existing breakage and would break the build bots. In practice, I don't think you should land this until fixing any issues you've already found. Once that's done, land, but expect to revert and fix found issues for a few cycles.

This revision is now accepted and ready to land.Jun 12 2019, 3:31 PM
This revision was automatically updated to reflect the committed changes.
yrouban marked an inline comment as done.