This is an archive of the discontinued LLVM Phabricator instance.

Hash DISubprogram Metadata using pointer for MDString argument instead of value (NFC)
ClosedPublic

Authored by mehdi_amini on Jan 25 2016, 3:06 PM.

Details

Summary

MDString are uniqued in the Context on creation, hashing the
pointer is less expensive than hashing the String itself.

Diff Detail

Event Timeline

mehdi_amini retitled this revision from to Hash DISubprogram Metadata using pointer for MDString argument instead of value (NFC).
mehdi_amini updated this object.
mehdi_amini added a reviewer: dexonsmith.
mehdi_amini added a subscriber: llvm-commits.
dexonsmith edited edge metadata.Jan 25 2016, 3:17 PM
dexonsmith added a subscriber: dexonsmith.

Nice cleanup, assuming the tests pass. LGTM, as long you follow up
by doing the rest of the MDNodeKeyImpls so they aren't inconsistent.
In fact, I don't really see a problem with doing them in bulk, but
split it up how you like.

mehdi_amini edited edge metadata.

Update using the pointer value for MDString for all the Metadata types

mehdi_amini accepted this revision.Mar 18 2016, 6:07 PM
mehdi_amini added a reviewer: mehdi_amini.

(mark as accepted before commit)

This revision is now accepted and ready to land.Mar 18 2016, 6:07 PM