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: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]

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_z1p4ie...@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.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to