简体   繁体   中英

GCC: conflicting optimizations

Due to long build times, I haven't been able to sufficiently narrow down the culprit leading to internal compiler error: Segmentation fault (I have managed to rule out LTO, though). Present in GCC versions 4.8.2, 4.8.3, and 4.9.1, rather than a bug I'm suspecting a conflict between the remaining various optimization strategies:

Generic: most likely unrelated, here for completeness

  • -pipe
  • -march=native
  • -O3
  • -msse2
  • -mfpmath=sse
  • -ffast-math

Graphite: loop optimization with regard to memory access

  • -floop-interchange
  • -floop-strip-mine
  • -floop-block

Graphite: not really sure

  • -fgraphite-identity

ISL: loop optimizations with regard to memory access and automatic parallelism

  • -floop-nest-optimize

Graphite: loop optimization with regard to automatic parallelism

  • -floop-parallelize-all
  • -ftree-parallelize-loops=2

Sets of options seem to share significant functional overlap. If this has likely been leading to the segmentation fault during compilation, which options should I preserve and which should I cull in order to maximize performance?

Finally narrowed the segfault down to the -ffast-math and -floop-parallelize-all options, exclusively. This issue is identical to [4.8/4.9 Regression] [graphite] Segmentation fault with -Ofast -floop-paralle... , and should be fixed upstream. Since the fix was pushed Jun 29, while gcc 4.9.1 was released Jul 16 it was branched in Apr, it is not included in the 4.8.3 and 4.9.1 releases.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM