This is an archive of the discontinued LLVM Phabricator instance.

[RFC] Alterative to https://reviews.llvm.org/D159169
AbandonedPublic

Authored by wlei on Aug 30 2023, 1:16 PM.

Details

Reviewers
hoy
wenlei

Diff Detail

Event Timeline

wlei created this revision.Aug 30 2023, 1:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 1:16 PM
wlei requested review of this revision.Aug 30 2023, 1:16 PM
Herald added a project: Restricted Project. · View Herald TranscriptAug 30 2023, 1:16 PM
wlei retitled this revision from tmp to [RFC] Alterative to https://reviews.llvm.org/D159169.Aug 30 2023, 6:03 PM
wlei added reviewers: hoy, wenlei.

Thanks for attempting the clean up. I think the original version is probably more readable. I left comments there. wdyt?

llvm/lib/Transforms/IPO/SampleProfile.cpp
2131

I guess you want to exclude debug or probe instrinsics, but I'm still not sure if we should exclude all intrinsics. llvm.memcpy is also an intrinsic, but is probably still a good anchor?

2152

It took me a while to understand the intention of this code... basically check on CalleeDIL is for checking whether it's inlined case or not... probably not very readable..

wlei added a comment.Aug 31 2023, 12:31 PM

Thanks for attempting the clean up. I think the original version is probably more readable. I left comments there. wdyt?

Sounds good, abandoning this, will work on the original patch.

llvm/lib/Transforms/IPO/SampleProfile.cpp
2131

It should be ok to exclude all the IntrinsicInst because this is consistent with the sample loader/inliner, I did a search, it looks in inliner we all have the if (isa<IntrinsicInst>(CB)) continue; right after the auto *CB = dyn_cast<CallBase>(&I);.

wlei abandoned this revision.Aug 31 2023, 12:31 PM