[PATCH] Unify handling guard variables in the Itanium C++ ABI

Justin Bogner mail at justinbogner.com
Tue Apr 22 09:57:10 PDT 2014


We previously treated ARM separately from the generic Itanium ABI for
initializing guard variables.  This code duplication led to things like
the ARM path missing the memory barrier for threadsafe handling, and a
highly misleading comment about how we were (mis)using the generic ABI
for ARM64 when really it went through the ARM codepath.

This unifies the two code paths.  Functionally, this changes the ARM and
ARM64 codepath to use one byte loads instead of 4 and 8, respectively,
and adds the missing atomic acquire to these loads.  Other architectures
are unchanged.

Okay to commit?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: guarded-init.patch
Type: text/x-patch
Size: 6993 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140422/a0b56a33/attachment.bin>


More information about the cfe-commits mailing list