Cheng Shao pushed to branch wip/fix-clang-23 at Glasgow Haskell Compiler / GHC

Commits:

6 changed files:

Changes:

  • changelog.d/llvm-23
    1
    +section: llvm-backend
    
    2
    +synopsis: Bump LlvmMaxVersion to support LLVM 23.x releases.
    
    3
    +issues: #27764
    
    4
    +mrs: !16617

  • configure.ac
    ... ... @@ -557,7 +557,7 @@ AC_SUBST(InstallNameToolCmd)
    557 557
     # versions of LLVM simultaneously, but that stopped working around
    
    558 558
     # 3.5/3.6 release of LLVM.
    
    559 559
     LlvmMinVersion=13  # inclusive
    
    560
    -LlvmMaxVersion=23  # not inclusive
    
    560
    +LlvmMaxVersion=24  # not inclusive
    
    561 561
     AC_SUBST([LlvmMinVersion])
    
    562 562
     AC_SUBST([LlvmMaxVersion])
    
    563 563
     
    

  • rts/ProfHeap.c
    ... ... @@ -141,7 +141,10 @@ restore_locale( void )
    141 141
      * store only up to (max_era - 1) as its creation or last use time.
    
    142 142
      * -------------------------------------------------------------------------- */
    
    143 143
     unsigned int era;
    
    144
    +
    
    145
    +#if defined(PROFILING)
    
    144 146
     static uint32_t max_era;
    
    147
    +#endif
    
    145 148
     
    
    146 149
     StgWord user_era;
    
    147 150
     
    
    ... ... @@ -518,8 +521,10 @@ initHeapProfiling(void)
    518 521
             n_censuses = 1;
    
    519 522
         }
    
    520 523
     
    
    524
    +#if defined(PROFILING)
    
    521 525
         // max_era = 2^LDV_SHIFT
    
    522 526
         max_era = 1 << LDV_SHIFT;
    
    527
    +#endif
    
    523 528
     
    
    524 529
         censuses = stgMallocBytes(sizeof(Census) * n_censuses, "initHeapProfiling");
    
    525 530
     
    

  • rts/eventlog/EventLog.c
    ... ... @@ -113,8 +113,6 @@ static eventlog_init_func_t *eventlog_header_funcs = NULL;
    113 113
     // See Note [Maximum event length]
    
    114 114
     #define EVENT_LOG_SIZE 2 * (1024 * 1024) // 2MB
    
    115 115
     
    
    116
    -static int flushCount = 0;
    
    117
    -
    
    118 116
     // Struct for record keeping of buffer to store event types and events.
    
    119 117
     //
    
    120 118
     // Invariant: The event buffer will always begin with a block-start marker.
    
    ... ... @@ -1514,7 +1512,6 @@ void printAndClearEventBuf (EventsBuf *ebuf)
    1514 1512
             }
    
    1515 1513
     
    
    1516 1514
             resetEventsBuf(ebuf);
    
    1517
    -        flushCount++;
    
    1518 1515
     
    
    1519 1516
             postBlockMarker(ebuf);
    
    1520 1517
         }
    

  • rts/prim/atomic.c
    ... ... @@ -96,8 +96,6 @@ StgWord64 hs_atomic_nand64(StgWord x, StgWord64 val)
    96 96
       return __atomic_fetch_nand((volatile StgWord64 *) x, val, __ATOMIC_SEQ_CST);
    
    97 97
     }
    
    98 98
     
    
    99
    -#pragma GCC diagnostic pop
    
    100
    -
    
    101 99
     // FetchOrByteArrayOp_Int
    
    102 100
     
    
    103 101
     StgWord hs_atomic_or8(StgWord x, StgWord val)
    

  • utils/ghc-toolchain/src/GHC/Toolchain/Program.hs
    ... ... @@ -167,7 +167,7 @@ minLlvmVersion = 13
    167 167
     
    
    168 168
     -- Max llvm version (exclusive)
    
    169 169
     maxLlvmVersionExcl :: Int
    
    170
    -maxLlvmVersionExcl = 23
    
    170
    +maxLlvmVersionExcl = 24
    
    171 171
     
    
    172 172
     -- Max llvm version (inclusive)
    
    173 173
     maxLlvmVersion :: Int