This is an archive of the discontinued LLVM Phabricator instance.

Add clang frontend flags for MIP
AbandonedPublic

Authored by ellis on Jun 10 2021, 6:29 PM.

Details

Summary

Add clang frontend flags for machine profiles.

  • -fmachine-profile-generate
    • Produce an instrumented binary
  • -fmachine-profile-function-coverage
    • Only profile function coverage
  • -fmachine-profile-block-coverage
    • Profile basic block coverage
  • -fmachine-profile-link-unit-name=
    • Specify a name to identify the current link unit
  • -fno-machine-profile-runtime
    • Do not link the MIP runtime
  • -fno-machine-profile-dump
    • Do not dump the raw profile data when the program exits
  • -fmachine-profile-selected-function-group=, -fmachine-profile-function-group-count=
    • Only instrument group i of N total groups of functions
  • -fmachine-profile-use=
    • Use the provided profile for optimization

Diff Detail

Event Timeline

ellis created this revision.Jun 10 2021, 6:29 PM
ellis requested review of this revision.Jun 10 2021, 6:29 PM
Herald added projects: Restricted Project, Restricted Project. · View Herald TranscriptJun 10 2021, 6:29 PM
jhenderson added inline comments.Jun 11 2021, 12:12 AM
llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
59 ↗(On Diff #351326)

This doesn't look like it belongs as part of this commit?

ellis updated this revision to Diff 351604.Jun 11 2021, 5:30 PM

Move llvm-strip logic into its own commit

ellis updated this revision to Diff 352007.Jun 14 2021, 3:20 PM

MIP does not support windows

jhenderson resigned from this revision.Jun 14 2021, 11:50 PM
ellis updated this revision to Diff 353705.Jun 22 2021, 10:37 AM

Correctly link the runtime symbol for Mach-O.

ellis updated this revision to Diff 355066.Jun 28 2021, 4:31 PM

Add min instruction count frontend flag.

ellis abandoned this revision.Dec 16 2021, 4:51 PM