Skip to content

Conversation

nmanthey
Copy link
Contributor

These changes might improve the performance of CBMC, as well as allow to spot compilation problems earlier.

  • Each commit message has a non-empty body, explaining why the change was made.
  • Methods or procedures I have added are documented, following the guidelines provided in CODING_STANDARD.md.
  • Regression or unit tests are included, or existing tests cover the modified code (in this case I have detailed which ones those are in the commit message).
  • My commit message includes data points confirming performance improvements (if claimed).
  • My PR is restricted to a single feature or bugfix.
  • White-space or formatting changes outside the feature-related changed lines are in commits of their own.

Different build setups require different tools for the archive step.
Hence, we make the ar command a variable, so that the correct tool can
be specified for each environment.

Signed-off-by: Norbert Manthey <[email protected]>
Link time optimization allows inlining functions that would be located
in other building blocks otherwise. This might result in better
performance, but also in more compile time errors.

To be able to use flto objects in archives, instead of ar the tool gcc-ar
has to be used. Hence, when adding flto to CXX_FLAGS, also change AR
from ar to gcc-ar.

Signed-off-by: Norbert Manthey <[email protected]>
@nmanthey
Copy link
Contributor Author

@peterschrammel: I wonder whether -flto is useful to be included for the binary that'll be submitted to SVCOMP. If you have resources for another test, that would be helpful.

@kroening kroening added the Needs data This PR claims improvements that require further data to substantiate the claims. label Nov 14, 2018
@@ -35,6 +35,9 @@ endif
CFLAGS ?= -Wall -O2
CP_CFLAGS = -MMD -MP
CXXFLAGS ?= -Wall -O2
CXXFLAGS += -flto
LINKFLAGS += -flto
AR = gcc-ar
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess CI will probably tell us this, but will this work with clang builds?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this feature supposed to be stable in g++-5 ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

afaict, yes.

@nmanthey
Copy link
Contributor Author

I wonder whether the bug in CI is an flto stability error, or an actual problem in the code base that's now uncovered.

@TGWDB
Copy link
Contributor

TGWDB commented May 19, 2021

Closing as (as discussed in #6011 ) this may not be stable/suitable.

@TGWDB TGWDB closed this May 19, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs data This PR claims improvements that require further data to substantiate the claims.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants