Page MenuHomePhabricator

[NFC] Make pgo related options in opt more consistent.
ClosedPublic

Authored by wmi on Jan 15 2019, 3:23 PM.

Details

Summary

Currently we have pgo options defined in PassManagerBuilder.cpp only for instrument pgo, but not for sample pgo. We also have pgo options defined in NewPMDriver.cpp in opt only for new pass manager and for all kinds of pgo. They have some inconsistency.

To make the options more consistent and make tests writing easier, the patch let old pass manager to share the same pgo options with new pass manager in opt, and removes the options in PassManagerBuilder.cpp.

Diff Detail

Repository
rL LLVM

Event Timeline

wmi created this revision.Jan 15 2019, 3:23 PM
xur accepted this revision.Jan 15 2019, 4:08 PM

This cleanup looks good to me.

tools/opt/opt.cpp
274 ↗(On Diff #181895)

can we move this enum to header so that we won't duplicate in NewPMDriver.cpp?

This revision is now accepted and ready to land.Jan 15 2019, 4:08 PM
wmi marked an inline comment as done.Jan 16 2019, 3:19 PM
wmi added inline comments.
tools/opt/opt.cpp
274 ↗(On Diff #181895)

Done.

This revision was automatically updated to reflect the committed changes.

(belated lgtm)

llvm/trunk/tools/opt/NewPMDriver.h
43

It's unfortunate that there isn't an opt.h...