[llvm-commits] [patch][pr8927] Don't merge two constants if	both addresses are significant
    Chris Lattner 
    clattner at apple.com
       
    Sat Jan 15 23:27:34 PST 2011
    
    
  
On Jan 15, 2011, at 7:37 PM, Rafael Ávila de Espíndola wrote:
> This patch fixes the original testcase in PR8927. It also causes a clang binary built with a patched clang to increase in size by 0.21%.
> 
>  It is also possible that there are some other cases clang could add unnamed_addr to.
Looks good!
> We can probably get some of the size back by writing a pass that detects that a global never has its pointer compared and adds unnamed_addr to it.
This would be very very natural to add to the globalopt pass.  It already walks all uses of a global to see if it is address taken.  Are you willing to tackle adding this to globalopt?
-Chris
    
    
More information about the llvm-commits
mailing list