[GHC] #9397: Probable fix: add an INLINE[n] or NOINLINE[n] pragma confused?

#9397: Probable fix: add an INLINE[n] or NOINLINE[n] pragma confused? -------------------------------------+------------------------------------- Reporter: jrp | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build System | Version: 7.8.3 Keywords: | Operating System: Architecture: Unknown/Multiple | Unknown/Multiple Difficulty: Unknown | Type of failure: Incorrect Blocked By: | warning at compile-time Related Tickets: | Test Case: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Building ghc HEAD using 7.8.3 under OS X results in the following warnings: {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name binary-0.7.1.0 -hide-all-packages -i -ilibraries/binary/src -ilibraries/binary/dist-install/build -ilibraries/binary/dist- install/build/autogen -Ilibraries/binary/dist-install/build -Ilibraries/binary/dist-install/build/autogen -Ilibraries/binary/. -optP-DGENERICS -optP-include -optPlibraries/binary/dist- install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.1.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -O2 -Wall -fliberate-case-threshold=1000 -XHaskell98 -O2 -no-user-package-db -rtsopts -odir libraries/binary/dist-install/build -hidir libraries/binary/dist-install/build -stubdir libraries/binary/dist- install/build -split-objs -dynamic-too -c libraries/binary/src/Data/Binary/Get/Internal.hs -o libraries/binary/dist- install/build/Data/Binary/Get/Internal.o -dyno libraries/binary/dist- install/build/Data/Binary/Get/Internal.dyn_o libraries/binary/src/Data/Binary/Get/Internal.hs:314:1: Warning: Rule "<$> to <*>" may never fire because ‘<$>’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘<$>’ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name binary-0.7.1.0 -hide-all-packages -i -ilibraries/binary/src -ilibraries/binary/dist-install/build -ilibraries/binary/dist- install/build/autogen -Ilibraries/binary/dist-install/build -Ilibraries/binary/dist-install/build/autogen -Ilibraries/binary/. -optP-DGENERICS -optP-include -optPlibraries/binary/dist- install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.1.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -O2 -Wall -fliberate-case-threshold=1000 -XHaskell98 -O2 -no-user-package-db -rtsopts -odir libraries/binary/dist-install/build -hidir libraries/binary/dist-install/build -stubdir libraries/binary/dist- install/build -split-objs -dynamic-too -c libraries/binary/src/Data/Binary/Get.hs -o libraries/binary/dist- install/build/Data/Binary/Get.o -dyno libraries/binary/dist- install/build/Data/Binary/Get.dyn_o libraries/binary/src/Data/Binary/Get.hs:416:1: Warning: Rule "getWord8/readN" may never fire because ‘getWord8’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord8’ libraries/binary/src/Data/Binary/Get.hs:417:1: Warning: Rule "getWord16be/readN" may never fire because ‘getWord16be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord16be’ libraries/binary/src/Data/Binary/Get.hs:418:1: Warning: Rule "getWord16le/readN" may never fire because ‘getWord16le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord16le’ libraries/binary/src/Data/Binary/Get.hs:419:1: Warning: Rule "getWord32be/readN" may never fire because ‘getWord32be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord32be’ libraries/binary/src/Data/Binary/Get.hs:420:1: Warning: Rule "getWord32le/readN" may never fire because ‘getWord32le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord32le’ libraries/binary/src/Data/Binary/Get.hs:421:1: Warning: Rule "getWord64be/readN" may never fire because ‘getWord64be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord64be’ libraries/binary/src/Data/Binary/Get.hs:422:1: Warning: Rule "getWord64le/readN" may never fire because ‘getWord64le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord64le’ }}} Not sure what the probable fix is suggesting as the functions that are pointed are already marked as INLINE. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9397 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9397: Probable fix: add an INLINE[n] or NOINLINE[n] pragma confused? -------------------------------------+------------------------------------- Reporter: jrp | Owner: Type: task | Status: new Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: warning at compile-time | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Description changed by jrp: Old description:
Building ghc HEAD using 7.8.3 under OS X results in the following warnings: {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name binary-0.7.1.0 -hide-all-packages -i -ilibraries/binary/src -ilibraries/binary/dist-install/build -ilibraries/binary/dist- install/build/autogen -Ilibraries/binary/dist-install/build -Ilibraries/binary/dist-install/build/autogen -Ilibraries/binary/. -optP-DGENERICS -optP-include -optPlibraries/binary/dist- install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.1.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -O2 -Wall -fliberate-case-threshold=1000 -XHaskell98 -O2 -no-user-package-db -rtsopts -odir libraries/binary/dist-install/build -hidir libraries/binary/dist-install/build -stubdir libraries/binary/dist- install/build -split-objs -dynamic-too -c libraries/binary/src/Data/Binary/Get/Internal.hs -o libraries/binary /dist-install/build/Data/Binary/Get/Internal.o -dyno libraries/binary /dist-install/build/Data/Binary/Get/Internal.dyn_o
libraries/binary/src/Data/Binary/Get/Internal.hs:314:1: Warning: Rule "<$> to <*>" may never fire because ‘<$>’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘<$>’ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name binary-0.7.1.0 -hide-all-packages -i -ilibraries/binary/src -ilibraries/binary/dist-install/build -ilibraries/binary/dist- install/build/autogen -Ilibraries/binary/dist-install/build -Ilibraries/binary/dist-install/build/autogen -Ilibraries/binary/. -optP-DGENERICS -optP-include -optPlibraries/binary/dist- install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.1.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -O2 -Wall -fliberate-case-threshold=1000 -XHaskell98 -O2 -no-user-package-db -rtsopts -odir libraries/binary/dist-install/build -hidir libraries/binary/dist-install/build -stubdir libraries/binary/dist- install/build -split-objs -dynamic-too -c libraries/binary/src/Data/Binary/Get.hs -o libraries/binary/dist- install/build/Data/Binary/Get.o -dyno libraries/binary/dist- install/build/Data/Binary/Get.dyn_o
libraries/binary/src/Data/Binary/Get.hs:416:1: Warning: Rule "getWord8/readN" may never fire because ‘getWord8’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord8’
libraries/binary/src/Data/Binary/Get.hs:417:1: Warning: Rule "getWord16be/readN" may never fire because ‘getWord16be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord16be’
libraries/binary/src/Data/Binary/Get.hs:418:1: Warning: Rule "getWord16le/readN" may never fire because ‘getWord16le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord16le’
libraries/binary/src/Data/Binary/Get.hs:419:1: Warning: Rule "getWord32be/readN" may never fire because ‘getWord32be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord32be’
libraries/binary/src/Data/Binary/Get.hs:420:1: Warning: Rule "getWord32le/readN" may never fire because ‘getWord32le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord32le’
libraries/binary/src/Data/Binary/Get.hs:421:1: Warning: Rule "getWord64be/readN" may never fire because ‘getWord64be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord64be’
libraries/binary/src/Data/Binary/Get.hs:422:1: Warning: Rule "getWord64le/readN" may never fire because ‘getWord64le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord64le’
}}}
Not sure what the probable fix is suggesting as the functions that are pointed are already marked as INLINE.
New description: Building ghc HEAD using 7.8.3 under OS X results in the following warnings: {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name binary-0.7.1.0 -hide-all-packages -i -ilibraries/binary/src -ilibraries/binary/dist-install/build -ilibraries/binary/dist- install/build/autogen -Ilibraries/binary/dist-install/build -Ilibraries/binary/dist-install/build/autogen -Ilibraries/binary/. -optP-DGENERICS -optP-include -optPlibraries/binary/dist- install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.1.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -O2 -Wall -fliberate-case-threshold=1000 -XHaskell98 -O2 -no-user-package-db -rtsopts -odir libraries/binary/dist-install/build -hidir libraries/binary/dist-install/build -stubdir libraries/binary/dist- install/build -split-objs -dynamic-too -c libraries/binary/src/Data/Binary/Get/Internal.hs -o libraries/binary/dist- install/build/Data/Binary/Get/Internal.o -dyno libraries/binary/dist- install/build/Data/Binary/Get/Internal.dyn_o libraries/binary/src/Data/Binary/Get/Internal.hs:314:1: Warning: Rule "<$> to <*>" may never fire because ‘<$>’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘<$>’ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name binary-0.7.1.0 -hide-all-packages -i -ilibraries/binary/src -ilibraries/binary/dist-install/build -ilibraries/binary/dist- install/build/autogen -Ilibraries/binary/dist-install/build -Ilibraries/binary/dist-install/build/autogen -Ilibraries/binary/. -optP-DGENERICS -optP-include -optPlibraries/binary/dist- install/build/autogen/cabal_macros.h -package array-0.5.0.0 -package base-4.7.1.0 -package bytestring-0.10.4.0 -package containers-0.5.5.1 -O2 -Wall -fliberate-case-threshold=1000 -XHaskell98 -O2 -no-user-package-db -rtsopts -odir libraries/binary/dist-install/build -hidir libraries/binary/dist-install/build -stubdir libraries/binary/dist- install/build -split-objs -dynamic-too -c libraries/binary/src/Data/Binary/Get.hs -o libraries/binary/dist- install/build/Data/Binary/Get.o -dyno libraries/binary/dist- install/build/Data/Binary/Get.dyn_o libraries/binary/src/Data/Binary/Get.hs:416:1: Warning: Rule "getWord8/readN" may never fire because ‘getWord8’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord8’ libraries/binary/src/Data/Binary/Get.hs:417:1: Warning: Rule "getWord16be/readN" may never fire because ‘getWord16be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord16be’ libraries/binary/src/Data/Binary/Get.hs:418:1: Warning: Rule "getWord16le/readN" may never fire because ‘getWord16le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord16le’ libraries/binary/src/Data/Binary/Get.hs:419:1: Warning: Rule "getWord32be/readN" may never fire because ‘getWord32be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord32be’ libraries/binary/src/Data/Binary/Get.hs:420:1: Warning: Rule "getWord32le/readN" may never fire because ‘getWord32le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord32le’ libraries/binary/src/Data/Binary/Get.hs:421:1: Warning: Rule "getWord64be/readN" may never fire because ‘getWord64be’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord64be’ libraries/binary/src/Data/Binary/Get.hs:422:1: Warning: Rule "getWord64le/readN" may never fire because ‘getWord64le’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘getWord64le’ }}} {{{ "inplace/bin/ghc-stage1" -hisuf hi -osuf o -hcsuf hc -static -O -H64m -package-name template-haskell-2.10.0.0 -hide-all-packages -i -ilibraries /template-haskell/. -ilibraries/template-haskell/dist-install/build -ilibraries/template-haskell/dist-install/build/autogen -Ilibraries /template-haskell/dist-install/build -Ilibraries/template-haskell/dist- install/build/autogen -Ilibraries/template-haskell/. -optP-include -optPlibraries/template-haskell/dist-install/build/autogen/cabal_macros.h -package base-4.7.1.0 -package pretty-1.1.1.1 -Wall -package-name template-haskell -XHaskell2010 -O2 -no-user-package-db -rtsopts -odir libraries/template-haskell/dist-install/build -hidir libraries /template-haskell/dist-install/build -stubdir libraries/template-haskell /dist-install/build -split-objs -dynamic-too -c libraries/template- haskell/./Language/Haskell/TH/Syntax.hs -o libraries/template-haskell /dist-install/build/Language/Haskell/TH/Syntax.o -dyno libraries/template- haskell/dist-install/build/Language/Haskell/TH/Syntax.dyn_o libraries/template-haskell/Language/Haskell/TH/Syntax.hs:505:11: Warning: Rule "TH:liftString" may never fire because ‘lift’ might inline first Probable fix: add an INLINE[n] or NOINLINE[n] pragma on ‘lift’ }}} Not sure what the probable fix is suggesting as the functions that are pointed are already marked as INLINE. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9397#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#9397: Probable fix: add an INLINE[n] or NOINLINE[n] pragma confused? -------------------------------------+------------------------------------- Reporter: jrp | Owner: Type: task | Status: closed Priority: normal | Milestone: Component: Build | Version: 7.8.3 System | Keywords: Resolution: invalid | Architecture: Unknown/Multiple Operating System: | Difficulty: Unknown Unknown/Multiple | Blocked By: Type of failure: Incorrect | Related Tickets: warning at compile-time | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- Changes (by carter): * status: new => closed * resolution: => invalid Comment: talk with the library maintainers, Not a ghc bug. GHC is conservatively linting the rewrite rules, not saying that the rules wont work ever. (i might be wrong how I'm reading, it but thats my take) -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/9397#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC