This is an archive of the discontinued LLVM Phabricator instance.

MachineModuleInfo: Move AddrLabelSymbols to AsmPrinter
ClosedPublic

Authored by arsenm on Apr 18 2022, 7:50 AM.

Details

Summary

This was tracking global state only used by the AsmPrinter, which can
store its own module global state.

Diff Detail

Event Timeline

arsenm created this revision.Apr 18 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2022, 7:50 AM
Herald added a subscriber: hiraditya. · View Herald Transcript
arsenm requested review of this revision.Apr 18 2022, 7:50 AM
Herald added a project: Restricted Project. · View Herald TranscriptApr 18 2022, 7:50 AM
Herald added a subscriber: wdng. · View Herald Transcript
arsenm updated this revision to Diff 423395.Apr 18 2022, 7:52 AM

Forgot to commit cleanup

rnk accepted this revision.Apr 18 2022, 11:51 AM

lgtm

llvm/include/llvm/CodeGen/AsmPrinter.h
180

This can be a unique_ptr so long as the ctor and dtor are defined in the relevant cpp file.

llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
176–177

nit: This can be class llvm::MMIAddrLabelMap {, and then the extra braces are not required.

This revision is now accepted and ready to land.Apr 18 2022, 11:51 AM
arsenm updated this revision to Diff 423475.Apr 18 2022, 2:45 PM

Use unique_ptr, drop MMI prefix

Hi Matt @arsenm !

May I check with you why commit https://reviews.llvm.org/rG9209a519180b478f7a77d7c4781ea857536d77ed does not have a link to this patch?

Thanks!!

FYI @zibi

Hi Matt @arsenm !

May I check with you why commit https://reviews.llvm.org/rG9209a519180b478f7a77d7c4781ea857536d77ed does not have a link to this patch?

Thanks!!

FYI @zibi

I don't use arc which adds those comments

Hi Matt @arsenm !

May I check with you why commit https://reviews.llvm.org/rG9209a519180b478f7a77d7c4781ea857536d77ed does not have a link to this patch?

Thanks!!

FYI @zibi

I don't use arc which adds those comments

Ah got it! Thanks so much for getting back to me! I am a new contributor so I am trying to understand the convention from the community. If you don't mind, could you help me understand if I myself should or should not use arc? For commits I am working myself, should I link the reviews to them? Could you offer some pointers for me to stare at? I have gone through https://llvm.org/docs/Contributing.html#how-to-submit-a-patch and https://llvm.org/docs/CodeReview.html and it is not clear to me what convention I should follow.

Thanks for your patience!

Hi Matt @arsenm !

May I check with you why commit https://reviews.llvm.org/rG9209a519180b478f7a77d7c4781ea857536d77ed does not have a link to this patch?

Thanks!!

FYI @zibi

I don't use arc which adds those comments

Ah got it! Thanks so much for getting back to me! I am a new contributor so I am trying to understand the convention from the community. If you don't mind, could you help me understand if I myself should or should not use arc? For commits I am working myself, should I link the reviews to them? Could you offer some pointers for me to stare at? I have gone through https://llvm.org/docs/Contributing.html#how-to-submit-a-patch and https://llvm.org/docs/CodeReview.html and it is not clear to me what convention I should follow.

Thanks for your patience!

If you want to? I'm set in my ways and have given up fighting with arc's workflow the few times I've tried to use it