This is an archive of the discontinued LLVM Phabricator instance.

[PGO] Fix name encoding for ObjC-like functions
ClosedPublic

Authored by vsk on Mar 28 2016, 8:34 AM.

Details

Summary

Function names in ObjC can have spaces in them. This interacts poorly with name compression, which uses spaces to separate PGO names. Fix the issue by using a different separator and add a test.

I chose "\01" as the separator because 1) it's non-printable, 2) we strip it from PGO names, and 3) it's the next natural choice once "\00" is discarded (that one's overloaded).

Diff Detail

Event Timeline

vsk updated this revision to Diff 51792.Mar 28 2016, 8:34 AM
vsk retitled this revision from to [PGO] Fix name encoding for ObjC-like functions.
vsk updated this object.
vsk added a reviewer: davidxl.
vsk added a subscriber: llvm-commits.
davidxl accepted this revision.Mar 28 2016, 8:42 AM
davidxl edited edge metadata.

Can you define a symbolic constant for it in InstrProf.h? Otherwise lgtm.

This revision is now accepted and ready to land.Mar 28 2016, 8:42 AM
This revision was automatically updated to reflect the committed changes.