This is an archive of the discontinued LLVM Phabricator instance.

remove useless call in MIRSampleProfile.cpp
ClosedPublic

Authored by XinWang10 on Apr 13 2023, 11:26 PM.

Details

Summary

This call getSummary returns a value but nobody take
it.

Diff Detail

Event Timeline

XinWang10 created this revision.Apr 13 2023, 11:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 11:26 PM
XinWang10 requested review of this revision.Apr 13 2023, 11:26 PM
Herald added a project: Restricted Project. · View Herald TranscriptApr 13 2023, 11:26 PM
skan added inline comments.Apr 16 2023, 11:40 PM
llvm/lib/CodeGen/MIRSampleProfile.cpp
277

I'm afraid we can not remove it b/c getSummary may change the internal state of Reader.

XinWang10 added inline comments.Apr 17 2023, 12:13 AM
llvm/lib/CodeGen/MIRSampleProfile.cpp
277

This will just call unique_ptr::get() to return a ptr.

skan accepted this revision.Apr 17 2023, 12:33 AM

LGTM, better wait a few days for other reviewers.

This revision is now accepted and ready to land.Apr 17 2023, 12:33 AM
This revision was automatically updated to reflect the committed changes.