Skip to content

IPO/LTO inter-procedural-optimization/link-time-optimization option missing #822

Description

@c2r68fs65

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.

Metadata

Metadata

Assignees

Labels

AApple reported or Apple-only issue (i.e. something that doesn't seem to occur on Windows or Linux.)EnhancementThis issue does not describe a problem but rather describes a suggested change or improvement.LLinux reported or Linux-only issue, such as with tuntap networking that doesn't occur on Windows.

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions