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: unassignedb...@nondot.org
          Reporter: e...@efcs.ca
                CC: htmldevelo...@gmail.com, llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to