This is an archive of the discontinued LLVM Phabricator instance.

[PGO] Use a helper function to find all indirect call-sites
ClosedPublic

Authored by xur on Apr 1 2016, 11:10 AM.

Details

Summary

This is another code cleanup suggested by Sean Silva in review of http://reviews.llvm.org/D17864.
It uses a helper function to find all the direct-calls-sites in a function. This makes the caller cleaner.
I also split the code into a separated file as this will be shared by another source file for indirect-call-promotion transformation (D17864).

Thanks,

-Rong

Diff Detail

Event Timeline

xur updated this revision to Diff 52396.Apr 1 2016, 11:10 AM
xur retitled this revision from to [PGO] Use a helper function to find all indirect call-sites.
xur updated this object.
xur added reviewers: silvas, davidxl.
xur added subscribers: llvm-commits, xur.
xur updated this revision to Diff 52434.Apr 1 2016, 3:29 PM

Remove dead code.

-Rong

silvas accepted this revision.Apr 1 2016, 4:02 PM
silvas edited edge metadata.

LGTM with a nit.

lib/Transforms/Instrumentation/IndirectCallSiteVisitor.h
36 ↗(On Diff #52434)

Nit: I think we usually say static inline.

This revision is now accepted and ready to land.Apr 1 2016, 4:02 PM
This revision was automatically updated to reflect the committed changes.