Skip to content
  • Duncan Sands's avatar
    Teach GVN to also propagate switch cases. For example, in this code · c52af464
    Duncan Sands authored
      switch (n) {
        case 27:
          do_something(x);
        ...
      }
    the call do_something(x) will be replaced with do_something(27).  In
    gcc-as-one-big-file this results in the removal of about 500 lines of
    bitcode (about 0.02%), so has about 1/10 of the effect of propagating
    branch conditions.
    
    llvm-svn: 141360
    c52af464
Loading