This is the mail archive of the 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 Fri, Oct 19, 2007 at 03:04:49PM +0200, Steven Bosscher wrote:
> > > 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.

To expand on this:

__tls_get_addr can side effects.  The only one I'm sure of offhand
is that it can allocate previously unallocated thread-local storage
for the current thread / module.  I think in Alex's clever descriptor
stuff it was called indirectly through the GOT entry and could also
modify the GOT entry to call a simpler function.

But omitting those side effects is, from the POV of a conforming
program, fine.  Everywhere except in the dynamic linker during TLS
setup, at least.  Can't we get away with marking it const or pure?

Daniel Jacobowitz

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