Issue 75956
Summary [libc] LIBC_INLINE_ASM pessimizes asm statements that are not implicitly volatile
Labels libc
Assignees
Reporter nickdesaulniers
    why do we have LIBC_INLINE_ASM? Throwing volatile on every asm is a pessimization. It generally prevents CSE which is bad.

> asm statements that have no output operands and asm goto statements, are implicitly volatile.

https://gcc.gnu.org/onlinedocs/gcc/Extended-Asm.html#Volatile

We're pretty inconsistent in our use of `asm` vs `__asm__` (and same with `__volatile__`).  We should clean all that up and just use `asm` then explicitly mark cases where we need `volatile`.

Putting volatile around everything is great for avoiding compiler bugs from 20 year old compilers, which we don't support.

Putting __ prefix+suffix also doesn't seem necessary.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to