[llvm-commits] [llvm] r122801 - /llvm/trunk/lib/Transforms/Scalar/CodeGenPrepare.cpp

Cameron Zwarich zwarich at apple.com
Wed Jan 5 23:17:05 PST 2011


On Jan 5, 2011, at 3:44 PM, Jakob Stoklund Olesen wrote:

> On Jan 5, 2011, at 2:53 PM, Cameron Zwarich wrote:
>> I tried implementing this, only reiterating over each basic block after optimizing a memory instruction instead of rechecking the whole function. I got the following results on test-suite + SPEC2000 & SPEC2006. This seems to disagree with my previous printf-based approach to counting the extra improvements.
> 
> [... almost, but not quite identical results ..]
> 
>> I guess I'll still have to work at getting it closer in code quality. Maybe I'll need to make all of the optimizations feed into a worklist, which could be tricky.
> 
> I think an instruction-based work list should give you even better performance than anything basic on basic blocks.
> 
> Whenever an instruction is sunk, add all its operands to the work list. You should probably use a SetVector for stable results.

This doesn't catch all of the cases. In fact, nothing I try, either on a BB or Instruction level, seems to catch all of the cases with less compile time. I can't think of anything else to do, but maybe something will come to me.

Cameron



More information about the llvm-commits mailing list