This is an archive of the discontinued LLVM Phabricator instance.

Take out resource tracking from ASM printer.
Needs ReviewPublic

Authored by madhur13490 on Jun 24 2020, 8:33 AM.

Details

Summary

This primary purpose of this patch is to take out
resource tracking out of ASM printing and make it
available as a service to others. ASMPrinting
should not ideally do such analysis and should
just print stuff. This is useful in
successive patches.

The tracker is being used by ASM printing as
of now but intention is to have this analysis
as a sperate MachineFunction pass and "clients"
can query whatever it wants from the tracker.

Further patches will convert this into an analysis pass
to be used in a general sense and ASMPrinter can "depend"
on it.

Diff Detail

Event Timeline

madhur13490 created this revision.Jun 24 2020, 8:33 AM
Herald added a project: Restricted Project. · View Herald TranscriptJun 24 2020, 8:33 AM

I don't see where else this could be validly used?

llvm/lib/Target/AMDGPU/AMDGPUAsmPrinter.h
80

There's basically never a need for shared_ptr. unique_ptr is almost always better

Address comments by arsenm, revise description

madhur13490 marked an inline comment as done.Jun 25 2020, 3:16 AM
madhur13490 edited the summary of this revision. (Show Details)Jun 25 2020, 3:18 AM
madhur13490 added a reviewer: sameerds.
arsenm added a comment.Aug 6 2021, 8:30 AM

Is this still relevant?

arsenm resigned from this revision.Jan 26 2022, 3:27 PM

This was already done