Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Matthew Pickering's avatar
    01fd2617
    profiling: Look in RHS of rules for cost centre ticks · 01fd2617
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    There are some obscure situations where the RHS of a rule can contain a
    tick which is not mentioned anywhere else in the program. If this
    happens you end up with an obscure linker error. The solution is quite
    simple, traverse the RHS of rules to also look for ticks. It turned out
    to be easier to implement if the traversal was moved into CoreTidy
    rather than at the start of code generation because there we still had
    easy access to the rules.
    
    ./StreamD.o(.text+0x1b9f2): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'
    ./MArray.o(.text+0xbe83): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'
    Main.o(.text+0x6fdb): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'
    01fd2617
    History
    profiling: Look in RHS of rules for cost centre ticks
    Matthew Pickering authored and Marge Bot's avatar Marge Bot committed
    There are some obscure situations where the RHS of a rule can contain a
    tick which is not mentioned anywhere else in the program. If this
    happens you end up with an obscure linker error. The solution is quite
    simple, traverse the RHS of rules to also look for ticks. It turned out
    to be easier to implement if the traversal was moved into CoreTidy
    rather than at the start of code generation because there we still had
    easy access to the rules.
    
    ./StreamD.o(.text+0x1b9f2): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'
    ./MArray.o(.text+0xbe83): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'
    Main.o(.text+0x6fdb): error: undefined reference to 'StreamK_mkStreamFromStream_HPC_cc'
Code owners
Assign users and groups as approvers for specific file changes. Learn more.