[PATCH] D12038: CodeGen: Introduce CodeGenModule::CreateMetadataIdentifierForType.

Peter Collingbourne via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 17 21:21:31 PDT 2015


pcc added inline comments.

================
Comment at: lib/CodeGen/CodeGenModule.cpp:3677
@@ +3676,3 @@
+llvm::Metadata *CodeGenModule::CreateMetadataIdentifierForType(QualType T) {
+  llvm::Metadata *&InternalId = MetadataIdMap[T.getCanonicalType()];
+  if (InternalId)
----------------
Prazek wrote:
> question: so You are storing distinct and normal mdnodes here. Is it faster to grap normal node from this map than to just create new one using get?
Quite possibly (the latter involves string comparisons and possibly memory allocation) but they should both have the same complexity so it doesn't matter much.


http://reviews.llvm.org/D12038





More information about the cfe-commits mailing list