[llvm-bugs] [Bug 40571] New: Teach LLVM to elide empty static variable guards.

via llvm-bugs llvm-bugs at lists.llvm.org
Sat Feb 2 03:55:38 PST 2019


https://bugs.llvm.org/show_bug.cgi?id=40571

            Bug ID: 40571
           Summary: Teach LLVM to elide empty static variable guards.
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: eric at efcs.ca
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org

LLVM is great at eliding unneeded initializers and forgetting about trivial
destructors, But it doesn't clean up after itself. It leaves empty guarded
initialization blocks.

For example: https://godbolt.org/z/ONmG22

The [[constinit, no_destroy]] case is particularly frustrating.

LLVM should be taught te recognize and remove empty initialization guards.

-- 
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/20190202/0a9e8e68/attachment.html>


More information about the llvm-bugs mailing list