[llvm-commits] [llvm] r122596 - /llvm/trunk/lib/CodeGen/StrongPHIElimination.cpp

Cameron Zwarich zwarich at apple.com
Wed Dec 29 02:32:54 PST 2010

On Dec 28, 2010, at 3:08 PM, Jakob Stoklund Olesen wrote:

> Maybe you are going about this the wrong way. The majority of virtual registers are never involved with PHIs, so StrongPHIElimination shouldn't have to look at them at all. Yet, here you are iterating over all operands in the machine code.
> Perhaps you could keep track of the virtual registers that are used or defined by PHI instructions and use their use-def chains instead?

If I use def-use chains to build arrays of relevant instructions per-MBB and then sort them by SlotIndex before running the existing code, I get a 47% speedup. I'll clean it up and land it.


More information about the llvm-commits mailing list