http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53991
--- Comment #7 from torvald at gcc dot gnu.org --- A piece of code is tm_pure if, roughly, it doesn't need any instrumentation (e.g., in contrast to memory loads/stores). In the test case, I suppose that the compiler detects that it is tm_pure, but we also allow programmers to declare it. Ideally, tm_pure should be a property of a region of code that is preserved across optimizations (but where we don't move code into or out of tm_pure regions). That may require too much implementation effort (but perhaps we could reuse the TM regions for that, as a "no-TM" region?) Alternatively, we could not automatically mark always_inline functions also as tm_pure, and warn if always_inline is also annotated as tm_pure by the programmer. Other thoughts?