[llvm-bugs] [Bug 33072] New: Exponential code growth while inlining internal functions

via llvm-bugs llvm-bugs at lists.llvm.org
Wed May 17 08:54:41 PDT 2017


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

            Bug ID: 33072
           Summary: Exponential code growth while inlining internal
                    functions
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: arielb1 at mail.tau.ac.il
                CC: llvm-bugs at lists.llvm.org

Created attachment 18456
  --> https://bugs.llvm.org/attachment.cgi?id=18456&action=edit
File running 4^7 iterations of Collatz's Conjecture, which expands to 45kLoIR

It appears that under some situations I don't fully understand (e.g. the
attached example, which expands to over 45k lines of IR), LLVM can "deeply
inline" a tree of internal functions, causing exponential IR growth.

## Meta

This was originally reported as https://github.com/rust-lang/rust/issues/41696.

Confirmed on Rust's LLVM 4.0 and Debian's LLVM 3.9 - I don't have a trunk LLVM
ready right now.

## STR

$ wc -l sloline.cu.ll
83 sloline.cu.ll
$ opt -S -inline sloline.cu.ll | wc -l
45068
$

-- 
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/20170517/6466d2c5/attachment.html>


More information about the llvm-bugs mailing list