[llvm-commits] patch: CXAGuardElimination pass.
Eli Friedman
eli.friedman at gmail.com
Sun May 24 22:30:50 PDT 2009
On Sun, May 24, 2009 at 9:34 PM, Nick Lewycky <nicholas at mxc.ca> wrote:
> This pass eliminates dead calls to __cxa_guard_acquire and
> __cxa_guard_release. Those two functions are defined by the Itanium ABI as
> part of the thread-safe one-time construction ABI for static variables in
> functions.
>
> For example, this program:
>
> struct X {
> X(int) {}
> };
>
> void foo() {
> static X x(10);
> }
>
> would have calls to cxa_guard_* in foo, and this pass detects that there is
> no real work being done between the guards and therefore it is safe to
> eliminate them.
This isn't completely a question about your patch, but why are we
loading and storing an i8 from an i64 global?
-Eli
More information about the llvm-commits
mailing list