Skip to content
Snippets Groups Projects
Forked from Glasgow Haskell Compiler / GHC
Source project has a limited visibility.
  • Joachim Breitner's avatar
    a6d9c3a5
    CmmCommonBlockElim: Improve hash function · a6d9c3a5
    Joachim Breitner authored
    Previously, the hash function used to cut down the number of block
    comparisons did not take local registers into account, causing far too
    many similar, but different bocks to be considered candidates for the
    (expensive!) comparision.
    
    Adding register to the hash takes CmmCommonBlockElim's share of the
    runtime of the example in #10397 from 17% to 2.5%, and eliminates all
    unwanted hash collisions.
    
    This patch also replaces the fancy trie by a plain Data.Map. It turned
    out to be not performance critical, so this simplifies the code.
    
    Differential Revision: https://phabricator.haskell.org/D896
    
    (cherry picked from commit 73f836f5)
    a6d9c3a5
    History
    CmmCommonBlockElim: Improve hash function
    Joachim Breitner authored
    Previously, the hash function used to cut down the number of block
    comparisons did not take local registers into account, causing far too
    many similar, but different bocks to be considered candidates for the
    (expensive!) comparision.
    
    Adding register to the hash takes CmmCommonBlockElim's share of the
    runtime of the example in #10397 from 17% to 2.5%, and eliminates all
    unwanted hash collisions.
    
    This patch also replaces the fancy trie by a plain Data.Map. It turned
    out to be not performance critical, so this simplifies the code.
    
    Differential Revision: https://phabricator.haskell.org/D896
    
    (cherry picked from commit 73f836f5)
Code owners
Assign users and groups as approvers for specific file changes. Learn more.