[llvm-commits] [llvm] r130206 - in /llvm/trunk: lib/Transforms/Scalar/GVN.cpp test/Transforms/GVN/rle.ll test/Transforms/SimplifyCFG/2006-08-03-Crash.ll

Chris Lattner clattner at apple.com
Tue Apr 26 13:31:04 PDT 2011


On Apr 26, 2011, at 1:27 PM, Roman Divacky wrote:

>> This instcombine patch is the next step along the way (which will probably improve this, but not get us all the way to the goal), but is causing some codegen pessimizations that I have to deal with before it can land:
> 
> Yes, I realized that this is actually an improvement after I sent the mail :)
> 
> Anyway, on FreeBSD boot loader I am seeing GVN hurting the codesize.
> Removing GVN saves 84 bytes, disabling LoadPRE but keeping the rest
> of GVN saves 36 bytes. Thats 0.5% - 1%.
> 
> I wonder what to do. If LoadPRE in GVN generally makes things worse
> codesize wise maybe it should be disabled when optimizing for size?
> Maybe disable GVN at -Os completely?

I don't think that there is a general problem here, I think that it is specific to idioms in your code.  As I mentioned, I'm working on PR6627.  If I can get it down to the "optimal" code there, I think we'll have a clear win.

-Chris



More information about the llvm-commits mailing list