Archived issue #0033296
Coding - O3 level optimization leads to many failed tests on boolean operations
Description
On Mingw 12.1.0 compiler
tests
***
fails
But if we reduce optimization level to O2 - these failed tests pass without regressions.
We may get difference between two options by executing commands (from gcc manual):
gcc -c -Q -O2 --help=optimizers >O2.opt.txt
gcc -c -Q -O3 --help=optimizers >O3.opt.txt
diff O2.opt.txt O3.opt.txt
The difference will be in enabling of these options:
-fgcse-after-reload
-fipa-cp-clone
-floop-interchange
-floop-unroll-and-jam
-fpeel-loops
-fpredictive-commoning
-fsplit-loops
-fsplit-paths
-ftree-loop-distribution
-ftree-partial-pre
-funroll-completely-grow-size
-funswitch-loops
-fvect-cost-model=dynamic
-fversion-loops-for-strides
We tried to pass these arguments with O2 with CMAKE parameters:
CMAKE_CXX_FLAGS_RELEASE & CMAKE_C_FLAGS_RELEASE
But it became not equivalent to O3.
So, we are not able to catch the option(s), which breaks some boolean operation tests.
At this moment to compile OCCT with Mingw you could not use default optimization option O3 - only O2.
This is the problem, which we should investigate.
tests
***
fails
But if we reduce optimization level to O2 - these failed tests pass without regressions.
We may get difference between two options by executing commands (from gcc manual):
gcc -c -Q -O2 --help=optimizers >O2.opt.txt
gcc -c -Q -O3 --help=optimizers >O3.opt.txt
diff O2.opt.txt O3.opt.txt
The difference will be in enabling of these options:
-fgcse-after-reload
-fipa-cp-clone
-floop-interchange
-floop-unroll-and-jam
-fpeel-loops
-fpredictive-commoning
-fsplit-loops
-fsplit-paths
-ftree-loop-distribution
-ftree-partial-pre
-funroll-completely-grow-size
-funswitch-loops
-fvect-cost-model=dynamic
-fversion-loops-for-strides
We tried to pass these arguments with O2 with CMAKE parameters:
CMAKE_CXX_FLAGS_RELEASE & CMAKE_C_FLAGS_RELEASE
But it became not equivalent to O3.
So, we are not able to catch the option(s), which breaks some boolean operation tests.
At this moment to compile OCCT with Mingw you could not use default optimization option O3 - only O2.
This is the problem, which we should investigate.
Public activity
1 archived note
Participants are labeled by their role within this record.
we don't use mingw64 platform more