This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: bad hoist


   From: "David S. Miller" <davem@redhat.com>
   Date: Thu, 26 Sep 2002 16:01:11 -0700 (PDT)

Replying to myself...

I think I see what's going on.
   
   (call_insn/u 40 39 42 (parallel[ 
               (set (reg:DF 32 %f0)
                   (call (mem:SI (symbol_ref:SI ("_Q_qtod")) [0 S4 A32])
                       (const_int 0 [0x0])))
               (clobber (reg:SI 15 %o7))
           ] ) 335 {*call_value_symbolic_sp32} (nil)

The call is marked as const, but it clobbers memory while executing
somewhere external to the current function.

The loop mems hoisting code does not recognize this and happily
rewrites the MEM with a hoisted REG.

Any suggestions on how to fix this?  Marking quad libcalls as
non-const on Sparc is really going to be a huge regression
in the code generated so I'd like to avoid this if possible.

Maybe it should walk the CALL_INSN_FUNCTION_USAGE and for
each USE/CLOBBER, and mark any matching loop_mems as not to be
optimized.  How does that sound?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]