This allows using devirtualization in thin LTO builds on Mac OS X.
Details
- Reviewers
tejohnson steven_wu - Commits
- rGbc887a8d4a37: [ThinLTOCodeGenerator] Add support for index-based WPD
rC375224: [ThinLTOCodeGenerator] Add support for index-based WPD
rL375224: [ThinLTOCodeGenerator] Add support for index-based WPD
rGeb34c3e8a4a8: [ThinLTOCodeGenerator] Add support for index-based WPD
rL375219: [ThinLTOCodeGenerator] Add support for index-based WPD
Diff Detail
Event Timeline
Thanks for working on this. Comments inline.
lib/LTO/ThinLTOCodeGenerator.cpp | ||
---|---|---|
583 | I know this struct is callable but IsExported feels like a weird name for stuck. Maybe something like ExportedSymbolChecker? Same for IsPrevailing. | |
849 | Should we add indexed-based WPD into optimized as well? So we can add a unit test using optimize, rather than run. You can add a flag to llvm-lto to determine if WPD is enabled. |
Should we add indexed-based WPD into optimized as well?
The problem is where we would get summary with WPD resolutions in such case. The only place where combined index is saved is linkCombinedIndex but
it lacks information about exported symbols and it's not possible to devirtualize without it.
Extending linkCombinedIndex, so that --exported-symbol can be used in conjunction with --thinlto-action=thinlink can probably fix the issue.
The next step after that is probably to strip --exported-symbol flag from import and promote actions as combined index would be finalized after thin link is over.
I know this struct is callable but IsExported feels like a weird name for stuck. Maybe something like ExportedSymbolChecker?
Same for IsPrevailing.