[llvm-bugs] [Bug 45497] New: Remove -enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang
via llvm-bugs
llvm-bugs at lists.llvm.org
Fri Apr 10 12:52:24 PDT 2020
https://bugs.llvm.org/show_bug.cgi?id=45497
Bug ID: 45497
Summary: Remove
-enable-trivial-auto-var-init-zero-knowing-it-will-be-
removed-from-clang
Product: clang
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: C
Assignee: unassignedclangbugs at nondot.org
Reporter: keescook at chromium.org
CC: blitzrakete at gmail.com, dgregor at apple.com,
erik.pilkington at gmail.com, llvm-bugs at lists.llvm.org,
richard-llvm at metafoo.co.uk
Using -ftrivial-auto-var-init=zero is preferred by the Linux kernel for both
semantics and performance.
It's worth noting that Linus Torvalds would very much like to see zero-init be
a by-default change to how the Linux kernel's C "dialect" behaves:
https://lore.kernel.org/lkml/CAHk-=wgTM+cN7zyUZacGQDv3DuuoA4LORNPWgb1Y_Z1p4iedNQ@mail.gmail.com/
"So I'd like the zeroing of local variables to be a native compiler option..."
"This, btw, is why I also think that the "initialize with poison" is
pointless and wrong."
The performance issue is also very real (as noted in the thread above too).
Zero init is faster, and for making such a large change to the kernel, we want
to more efficient option. Can we please remove
-enable-trivial-auto-var-init-zero-knowing-it-will-be-removed-from-clang ?
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20200410/9a06c374/attachment.html>
More information about the llvm-bugs
mailing list