This is the mail archive of the gcc-patches@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: [PATCH] Fix DCE REG_LIBCALL note moving from noop move insns (PR rtl-optimization/33644)


On 10/19/07, Richard Kenner <kenner@vlsi1.ultra.nyu.edu> wrote:
> > Things like a multiplication can be CSE-ed in tree-ssa, so there
> > should not be any libcalls of this kind to CSE in the generated RTL.
> >
> > But TLS addressing is not exposed in GIMPLE so you can't CSE the TLS
> > addresses either.
>
> That's true, but we aren't depending *just* on cse'ing stuff at the tree
> level, are we?  We do cse multiplication libcalls at the RTL level and that
> same approach should work for TLS libcalls.

Yes.

I thought you were referring to my remark that we supposedly only need
libcalls for TLS address calls, but IIUC you in fact reacted to my
remark whether CSE of TLS libcalls actually works, right?

Anyway, yes, if you have libcall notes, then CSE of TLS libcalls should work.

> > Compile with -fpic.  There should only be one call to __tls_get_addr
> > to get a base address.  Without libcalls there will be two calls.  The
> > base address is not exposed in tree-ssa.
>
> But isn't the function marked const?  (Is that the right flag?)

__tls_get_addr is not const, and not pure either.

Gr.
Steven


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