[PATCH] D141993: [CodeGen][WIP] Split some functionality from DetectDeadLanes into its own class to be reused. NFCi

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jan 18 00:01:24 PST 2023


craig.topper created this revision.
craig.topper added reviewers: BeMg, arsenm, MatzeB, kparzysz.
Herald added a subscriber: hiraditya.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added a subscriber: wdng.
Herald added a project: LLVM.

This is an alternative to D140382 <https://reviews.llvm.org/D140382>.

This moves the first part of runOnce into a new class that can be
reused by D129735 <https://reviews.llvm.org/D129735>. This encapsulates the ownership of the worklist,
and VRegInfos into the new class. The code for updating the dead
lanes stays in the DetectDeadLanes class.

The new class is created on the stack during runOnMachineFunction
so all the data structures will be deleted after each run.
Previously we only cleared them after each run so the memory might
have stayed allocated across runs. Hopefully this allocation change
isn't a big deal.

I might still do some reordering of the functions to keep the classes
together, but I didn't do that yet to reduce the diff size.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D141993

Files:
  llvm/include/llvm/CodeGen/DetectDeadLanes.h
  llvm/lib/CodeGen/DetectDeadLanes.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D141993.490055.patch
Type: text/x-patch
Size: 15966 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20230118/75d59bf4/attachment.bin>


More information about the llvm-commits mailing list