Here is the text of my post on groups.io ( edited ):
It would be nice to be able to generate Hercules with the choice of enabling IPO/LTO inter-procedural-optimization/link-time-optimization .
My experiments with OORexx shows an increase in performance of between 5% - 8%.
Worth giving a try IMO!
For the external packages CMAKE builds, these statements provide the option:
option( WANT_IPO "" ON )
if( WANT_IPO )
cmake_policy(SET CMP0069 NEW)
include( CheckIPOSupported )
check_ipo_supported( RESULT IPO_SUPPORT OUTPUT output )
if( IPO_SUPPORT )
message( STATUS "'IPO/LTO' is supported and enabled" )
set( CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE )
else()
message (WARNING "'IPO/LTO' is not supported: ${output}")
endif( IPO_SUPPORT )
endif( WANT_IPO )
For hercules itself, things might be a little more complicated ...
But it should be enough to add "-flto=thin" to both CFLAGS and LDFLAGS. (yes, the flag is needed on both!).
good luck
enrico
P.S.
I posted the same issue in the Hercules-helper repo, which is where this issue should probably belong, since it requires modifications to only the build process for the external packages and Hercules itself, and not to any actual Hercules code.
Here is the text of my post on groups.io ( edited ):
It would be nice to be able to generate Hercules with the choice of enabling IPO/LTO inter-procedural-optimization/link-time-optimization .
My experiments with OORexx shows an increase in performance of between 5% - 8%.
Worth giving a try IMO!
For the external packages CMAKE builds, these statements provide the option:
For hercules itself, things might be a little more complicated ...
But it should be enough to add "-flto=thin" to both
CFLAGSandLDFLAGS. (yes, the flag is needed on both!).good luck
enrico
P.S.
I posted the same issue in the Hercules-helper repo, which is where this issue should probably belong, since it requires modifications to only the build process for the external packages and Hercules itself, and not to any actual Hercules code.