Issue 125238
Summary Clang doesn't reuse stack memory from separate scopes within a function
Labels clang
Assignees
Reporter StreetwareGames
    Code example: https://godbolt.org/z/s5eYh4oaY

The compiler allocates enough space for both structs, even though they're only used very temporarily. I see this as a missed memory optimization, although I could be wrong as I don't fully know what the C standard says about this.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to