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

            Bug ID: 47909
           Summary: NPM inliner does not perform alloca merging
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected], [email protected],
                    [email protected], [email protected],
                    [email protected]
            Blocks: 46649

The NPM inliner does not perform alloca merging. Lifetimes can help mitigate
the issue of not reusing stack slots when inlining multiple functions, but they
are not emitted at -O0. If we have something like

void a(void*);

 __attribute__((always_inline)) void b() {
        long long l[10000];
        a(l);
}

void c() {
        b();
        b();
        b();
        b();
        b();
        b();
        b();
        b();
        b();
        b();
        b();
        b();
        b();
}

the stack usage in c() is much much larger under the NPM than in the legacy PM
under -O0.

https://godbolt.org/z/bWaWvv


Referenced Bugs:

https://bugs.llvm.org/show_bug.cgi?id=46649
[Bug 46649] Change default pass manager to new pass manager
-- 
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