Skip to content

`-DDEBUG` inconsistencies on CI

I wrote a test case in 4c50ec74 which compares Cmm output.

Cmm output put the type of statement emitted into comments when ghc is compiled with -DDEBUG.

    pp_debug :: SDoc
    pp_debug =
      if not debugIsOn then empty
      else case node of
             CmmEntry {}             -> empty -- Looks terrible with text "  // CmmEntry"
             CmmComment {}           -> empty -- Looks also terrible with text "  // CmmComment"
             CmmTick {}              -> empty
             CmmUnwind {}            -> text "  // CmmUnwind"
             CmmAssign {}            -> text "  // CmmAssign"
             CmmStore {}             -> text "  // CmmStore"
             CmmUnsafeForeignCall {} -> text "  // CmmUnsafeForeignCall"
             CmmBranch {}            -> text "  // CmmBranch"
             CmmCondBranch {}        -> text "  // CmmCondBranch"
             CmmSwitch {}            -> text "  // CmmSwitch"
             CmmCall {}              -> text "  // CmmCall"
             CmmForeignCall {}       -> text "  // CmmForeignCall"

My test fails only on x86_64-linux-deb10-numa-slow-validate which is peculiar. It faills with this missmatch:

-           I64[Hp + 8] = I64[_c2::P64];
-           I64[Hp + 16] = I64[_c2::P64 + 8];
-           I64[Hp + 24] = I64[_c2::P64 + 16];
-           I64[Hp + 32] = I64[_c2::P64 + 24];
+           I64[Hp + 8] = I64[_c2::P64];   // CmmStore
+           I64[Hp + 16] = I64[_c2::P64 + 8];   // CmmStore
+           I64[Hp + 24] = I64[_c2::P64 + 16];   // CmmStore
+           I64[Hp + 32] = I64[_c2::P64 + 24];   // CmmStore

This indicates, to me anyway, that x86_64-linux-deb10-numa-slow-validate is the only CI target where the compiler is build with -DDEBUG enabled. Which is odd since I assume it should be enabled for all validate flavours at least.

For now I will just make these comments toggleable with a flag because that should be an option anyway.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information