AcademySoftwareFoundation / OpenShadingLanguage

Advanced shading language for production GI renderers
BSD 3-Clause "New" or "Revised" License
2.05k stars 347 forks source link

PR/FixIcxCompileTimes #1756

Closed AlexMWells closed 7 months ago

AlexMWells commented 7 months ago

Description

Added OSL_INTEL_CLASSIC_PRAGMA(...) which only emits for Intel(r) Clssic C++ Compiler, previously OSL_INTEL_PRAGMA did that.

As many Intel compiler specicif pragmas are now supported by icx and icc, redefined OSL_INTEL_PRAGMA to emit for the classic and llvm based Intel compilers (icc and icx). Updated some uses of OSL_INTEL_PRAGMA to OSL_INTEL_CLASSIC_PRAGMA as appropriate.

Fixed long icx 2023.1.0, 2023.2.0, 2023.2.1 build times for certain files by removing the "-mllvm -inline-threshold=100000" flag for all but 1 file avoiding the overhead of optimization passes being applied to inlined code that wasn't actually part of the SIMD loop that we truly needed inlined. icx now supports "#pragma forceinline recursive" which allows us to target just the SIMD loops to be inlined (as we did for icc).

Tests

Existing testsuite covers all changes here.

Checklist: