This is an archive of the discontinued LLVM Phabricator instance.

NFC: add early exit in ModuleSummaryAnalysis
ClosedPublic

Authored by Prazek on Aug 26 2016, 6:51 PM.

Details

Summary

Changed this code because it was not very readable.
The one question that I got after changing it is, should we
count calls to intrinsics? We don't add them to caller summary,
so maybe we shouldn't also count them?

Diff Detail

Repository
rL LLVM

Event Timeline

Prazek updated this revision to Diff 69457.Aug 26 2016, 6:51 PM
Prazek retitled this revision from to NFC: add early exit in ModuleSummaryAnalysis.
Prazek updated this object.
Prazek added reviewers: tejohnson, eraman, mehdi_amini.
Prazek added a subscriber: llvm-commits.
tejohnson accepted this revision.Aug 26 2016, 7:19 PM
tejohnson edited edge metadata.

LGTM thanks for the cleanup.

We should count intrinsic calls towards the instruction count of the function, because they often do translate to real instructions. Could in fact be more than 1. CallAnalyzer::visitCallSite does some analysis based on the type of intrinsic for the inliner, but I hadn't looked into cloning that here - if we unify the inliner and importer cost analysis we would presumably pick that up.

This revision is now accepted and ready to land.Aug 26 2016, 7:19 PM
This revision was automatically updated to reflect the committed changes.