This is an archive of the discontinued LLVM Phabricator instance.

[Docs][TypeMetadata] Type metadata is generated for targets other than x86-64 so remove the stale comments.
Needs ReviewPublic

Authored by mingmingl on May 1 2023, 1:48 PM.

Details

Reviewers
pcc

Diff Detail

Event Timeline

mingmingl created this revision.May 1 2023, 1:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 1:48 PM
mingmingl requested review of this revision.May 1 2023, 1:48 PM
Herald added a project: Restricted Project. · View Herald TranscriptMay 1 2023, 1:48 PM
mingmingl added a subscriber: tejohnson.

Hi, I modified triples to aarch64 ones in https://github.com/llvm/llvm-project/blob/main/clang/test/CodeGenCXX/type-metadata.cpp, and was able to get type metadata on the generated IR.

So send out this patch which seems outdated.

pcc added a comment.May 1 2023, 1:57 PM

This should probably be replaced with a list of supported architectures instead.

This should probably be replaced with a list of supported architectures instead.

The code where vtable type metadata is annotated (https://github.com/llvm/llvm-project/blob/c9d14b23292979a9b3846cd55e2fc4d96b20f33f/clang/lib/CodeGen/CGVTables.cpp#L1328) doesn't seem to rely on target-specific information. May I get some input on where the x86_64 limitation is initially added (even if it's just an implementation artifact)?

A best-effort exhaustive test would tell the list of supported architectures currently but could become stale; so if there is no target-specific dependency, i wonder if 'the type metadata is generated on arch1, arch2.. and could be extended at <pointer> for other archs' (which I would need input with).

pcc added a comment.May 1 2023, 3:17 PM

This is function type metadata, which uses a separate implementation to vtable type metadata that is platform-dependent. See LowerTypeTestsModule::createJumpTableEntry for the list of supported architectures.

This is function type metadata, which uses a separate implementation to vtable type metadata that is platform-dependent. See LowerTypeTestsModule::createJumpTableEntry for the list of supported architectures.

thanks! Just to make sure my understanding is correct,

The reason to update this part is that type metadata exist in non x86-64 IR, and used in places more than creating jump-table entries. So I thought the update would be useful for availability of the metadata (more than the platform-dependent use of it).

pcc added a comment.May 1 2023, 5:10 PM

What are we using function type metadata for besides CFI? I couldn't find any evidence of it being used for anything else.