This is an archive of the discontinued LLVM Phabricator instance.

[CodeGen][NFC] Declare copy constructor & copy assignment as deleted for ScheduleDAG
ClosedPublic

Authored by skan on May 26 2023, 12:35 AM.

Details

Summary

ScheduleDAG has derived classes ScheduleDAGVLIW and ScheduleDAGRRList,
which own resources that are freed in their destructors. Static analyzer
warns b/c they do not have user-written copy constructors.

According to the design of ScheduleDAG, it seems that it should always
be passed by reference. So I declare them as deleted in this patch.

Diff Detail

Event Timeline

skan created this revision.May 26 2023, 12:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 12:35 AM
Herald added a subscriber: MatzeB. · View Herald Transcript
skan requested review of this revision.May 26 2023, 12:35 AM
Herald added a project: Restricted Project. · View Herald TranscriptMay 26 2023, 12:35 AM
RKSimon accepted this revision.May 26 2023, 2:48 AM

LGTM with one minor

llvm/include/llvm/CodeGen/ScheduleDAG.h
571

Add a comment explaining this (similar to your patch summary)

This revision is now accepted and ready to land.May 26 2023, 2:48 AM
skan updated this revision to Diff 526015.May 26 2023, 3:51 AM

Address review comments: Add comments