[llvm-bugs] [Bug 47909] New: NPM inliner does not perform alloca merging

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Oct 19 17:00:28 PDT 2020


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: unassignedbugs at nondot.org
          Reporter: aeubanks at google.com
                CC: alina.sbirlea at gmail.com, davidxl at google.com,
                    htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    rnk at google.com
            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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201020/250b0cb8/attachment-0001.html>


More information about the llvm-bugs mailing list