[LLVMdev] PR 5723

David Greene dag at cray.com
Tue Dec 8 12:00:14 PST 2009


I just filed PR 5723.  This is a rather serious bug for us,
causing all sorts of problems in creating dynamically-linked
C++ programs due to the C++ runtime containing lots of leaf-like
routines that use thread-local storage.

I can imagine a number of hackish workarounds, but I think probably
the right way to go is to mark routines with thread-local storage
accesses in them as non-leaf.  I guess that would have to happen in
the PrologueEpilogueInserter.

Is there an easy way to tell if a MachineFunction uses TLS without doing
a full scan of the body?  Perhaps SelectionDAG will have to mark the
function somehow.

                              -Dave



More information about the llvm-dev mailing list