[Chapel Merge] Quiet compiler warning about unused `numLoops` in

Branch: refs/heads/main
Revision: 5a84617
Author: ronawho
Link: Unavailable
Log Message:

Merge pull request #18933 from ronawho/quiet-licm-compiler-warning

Quiet compiler warning about unused numLoops in LICM

[reviewed by @e-kayrakli]

Quiet a compiler warning about numLoops being unused in loop invariant
code motion. It's only used when detailed timings are on, so rework the
code so it's only declared/modified when timings are enabled.

Noticed by the gasnet team with some of their clang-13 CI testing.

Modified Files:
M compiler/optimizations/loopInvariantCodeMotion.cpp

Compare: https://github.com/chapel-lang/chapel/compare/ed6af91af86d...5a84617dae6e