-
Enhancement
-
Resolution: Unresolved
-
P4
-
None
make/autoconf/flags-cflags.m4
https://learn.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code
-O1 is a combination of flags that optimizes for size.
-O2 is a combination of flags that optimizes for speed.
C_O_FLAG_NORM is set to -O1.
C_O_FLAG_HIGH is set to -O1.
C_O_FLAG_SIZE is set to -Os which only hints to the compiler to prefer optimizing for size, but does not include all the optimizations of -O1.
C_O_FLAG_NORM should probably be set to either -O2 or -O1 with -Oi. -O1 will not prefer intrinsics without -Oi, so calls such as memcpy(foo, bar, <constant>) will still be function calls in some scenarios.
C_O_FLAG_HIGH should probably be set to -O2.
C_O_FLAG_SIZE should probably be set to -O1.
We could also probably disable exceptions and RTTI, similar to clang/GCC for the JVM, though I think the JVM make use SEH for something so we would have to be careful there.
https://learn.microsoft.com/en-us/cpp/build/reference/o-options-optimize-code
-O1 is a combination of flags that optimizes for size.
-O2 is a combination of flags that optimizes for speed.
C_O_FLAG_NORM is set to -O1.
C_O_FLAG_HIGH is set to -O1.
C_O_FLAG_SIZE is set to -Os which only hints to the compiler to prefer optimizing for size, but does not include all the optimizations of -O1.
C_O_FLAG_NORM should probably be set to either -O2 or -O1 with -Oi. -O1 will not prefer intrinsics without -Oi, so calls such as memcpy(foo, bar, <constant>) will still be function calls in some scenarios.
C_O_FLAG_HIGH should probably be set to -O2.
C_O_FLAG_SIZE should probably be set to -O1.
We could also probably disable exceptions and RTTI, similar to clang/GCC for the JVM, though I think the JVM make use SEH for something so we would have to be careful there.
- links to
-
Review openjdk/jdk/12073