This is an archive of the discontinued LLVM Phabricator instance.

[InstrProfiling] Emit bias variable eagerly
ClosedPublic

Authored by phosek on Aug 3 2021, 10:53 AM.

Details

Summary

Rather than emitting the bias variable lazily as needed, emit it
eagerly. This allows profile runtime to refer to this variable
unconditionally without having to use the weak reference. The bias
variable is in a COMDAT so there'll never be more than one instance,
and if it's not needed, linker should be able to GC it, so the overhead
should be minimal.

Diff Detail

Event Timeline

phosek created this revision.Aug 3 2021, 10:53 AM
phosek requested review of this revision.Aug 3 2021, 10:53 AM
Herald added a project: Restricted Project. · View Herald TranscriptAug 3 2021, 10:53 AM

Is there a corresponding change in the runtime?

Is there a corresponding change in the runtime?

This is a follow up to 54902e00d1280785042e2c7ec71b25a949ade92c, no other changes should be necessary at this point.

davidxl accepted this revision.Aug 3 2021, 9:05 PM

lgtm

This revision is now accepted and ready to land.Aug 3 2021, 9:05 PM
This revision was landed with ongoing or failed builds.Aug 4 2021, 10:18 AM
This revision was automatically updated to reflect the committed changes.