Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PGO and LTO build options to makefile #4651

Merged
merged 1 commit into from
Jul 22, 2015

Conversation

MartinNowak
Copy link
Member

  • workflow PGO

    rm -rf src/pgo
    make -C src -f posix.mak ENABLE_PGO_GENERATE=1
    .. use the generated dmd binary (e.g. build phobos)
    make -C src -f posix.mak clean
    make -C src -f posix.mak ENABLE_PGO_USE=1

  • workflow LTO

    make -C src -f posix.mak ENABLE_LTO=1

  • combining both is possible and beneficial

@MartinNowak
Copy link
Member Author

chart

@MartinNowak
Copy link
Member Author

If we had a small profile suite in the dmd repo itself, we could have a single make target that builds+profiles+builds dmd.

@MartinNowak
Copy link
Member Author

We'd need to decide on a representative profile suite, then could use this for extra optimized release builds.

@WalterBright
Copy link
Member

fix it and I'll pull it

- workflow PGO

  rm -rf src/pgo
  make -C src -f posix.mak ENABLE_PGO_GENERATE=1
  .. use the generated dmd binary (e.g. build phobos)
  make -C src -f posix.mak clean
  make -C src -f posix.mak ENABLE_PGO_USE=1

- workflow LTO

  make -C src -f posix.mak ENABLE_LTO=1

- combining both is possible and beneficial
@MartinNowak
Copy link
Member Author

Updated

@WalterBright
Copy link
Member

Auto-merge toggled on

WalterBright added a commit that referenced this pull request Jul 22, 2015
add PGO and LTO build options to makefile
@WalterBright WalterBright merged commit f00318b into dlang:master Jul 22, 2015
@denis-sh
Copy link
Contributor

Shouldn't we use -fwhole-program or -fuse-linker-plugin for LTO?

@denis-sh
Copy link
Contributor

And, probably, also -fno-fat-lto-objects?

@MartinNowak MartinNowak deleted the pgo_lto branch July 22, 2015 21:53
@MartinNowak
Copy link
Member Author

According to the documentation we should not set any of them.
https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html

@MartinNowak MartinNowak added changelog_v2.068 Review:Needs Changelog A changelog entry needs to be added to /changelog and removed changelog_v2.068 Review:Needs Changelog A changelog entry needs to be added to /changelog labels Aug 5, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants