On Thu, Mar 18, 2010 at 2:30 AM, Jim Wilson <wil...@codesourcery.com> wrote: > On Wed, 2010-03-17 at 11:27 +0800, fanqifei wrote: >> You are correct. The reload pass emitted the clr.w insn. >> However, I can see loop opt passes after reload: >> problem1.c.174r.loop2_invariant1 > > Not unless you have a modified toolchain. We don't run loop opt after > register allocation. See the list of optimization passes in the FSF GCC > passes.c file. loop2 occurs before ira/postreload. If you do have a > modified toolchain, then I doubt that the current loop passes would work > right, since they were designed to handle pseudo-regs not hard-regs. > > Jim > > > That passes were added by me more than two months ago. I thought these passes could perform the optimization of hoisting constant out of loop. I just removed them. Thanks very much for your help! Now I am working on the movsi expander.
-- -Qifei Fan http://freshtime.org