Page MenuHomePhabricator

Copy symbol length when we replace a symbol.
ClosedPublic

Authored by ruiu on May 21 2019, 11:36 PM.

Details

Summary

Symbol's NameSize is computed lazily. Currently, when we replace a symbol,
a cached length value can be discarded. This patch propagates that value.

Diff Detail

Repository
rL LLVM

Event Timeline

ruiu created this revision.May 21 2019, 11:36 PM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay accepted this revision.May 22 2019, 12:07 AM

It might be worth revalidating if lazy strlen improves performance now.

This revision is now accepted and ready to land.May 22 2019, 12:07 AM
ruiu added a comment.May 22 2019, 12:10 AM

It is definitely a win at least for local symbols. For local symbols, we store pointers to the beginning of symbol names, but oftentime we ended up not having to compute their sizes.

This revision was automatically updated to reflect the committed changes.