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

Jakob Stoklund Olesen stoklund at 2pi.dk
Wed Jan 5 15:44:01 PST 2011


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.

> Currently, it's about a 10% improvement in total llc time, though.

That is quite significant!

/jakob





More information about the llvm-commits mailing list