Skip to content

Commit

Permalink
Revise default compiler options for performance
Browse files Browse the repository at this point in the history
Signed-off-by: Juan Cruz Viotti <jv@jviotti.com>
  • Loading branch information
jviotti committed Sep 5, 2024
1 parent b1e30be commit f6b6a2a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion cmake/noa/compiler/options.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@ function(noa_add_default_options visibility target)
-Wnon-virtual-dtor
-Woverloaded-virtual
-Winvalid-offsetof
-funroll-loops
-fstrict-aliasing

# Assume that signed arithmetic overflow of addition, subtraction and
# multiplication wraps around using twos-complement representation
Expand Down Expand Up @@ -68,7 +70,12 @@ function(noa_add_default_options visibility target)
-Wc++11-extensions
-Wcomma
-Wno-exit-time-destructors
-Wrange-loop-analysis)
-Wrange-loop-analysis

# Enable loop vectorization for performance reasons
-fvectorize
# Enable vectorization of straight-line code for performance
-fslp-vectorize)
elseif(NOA_COMPILER_GCC)
# Newer versions of GCC (i.e. 14) seem to print a lot of false-positives here
target_compile_options("${target}" ${visibility} -Wno-dangling-reference)
Expand Down

0 comments on commit f6b6a2a

Please sign in to comment.