Skip to content

Commit 8cc0956

Browse files
committed
Don't force inlining of long form of getNthWord
`getNthWord` has two implementations. While the implementation used when `FastWordExtract` is set is quite lean and perhaps worth inlining, the other implementation (used, among other cases, in the case of ARM targets) is far too large. This results in the simplifier exploding. Don't require inlining of the non-`FastWordExtract` case.
1 parent 8c90818 commit 8cc0956

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Data/Digest/Pure/MD5.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,13 +241,13 @@ applyMD5Rounds (MD5Par a b c d) w = {-# SCC "applyMD5Rounds" #-}
241241

242242
#ifdef FastWordExtract
243243
getNthWord n b = inlinePerformIO (unsafeUseAsCString b (flip peekElemOff n . castPtr))
244+
{-# INLINE getNthWord #-}
244245
#else
245246
getNthWord :: Int -> B.ByteString -> Word32
246247
getNthWord n = right . G.runGet G.getWord32le . B.drop (n * sizeOf (undefined :: Word32))
247248
where
248249
right x = case x of Right y -> y
249250
#endif
250-
{-# INLINE getNthWord #-}
251251

252252
----- Some quick and dirty instances follow -----
253253

0 commit comments

Comments
 (0)