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?
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
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.