[LLVMbugs] [Bug 20419] New: clang should not copy parameters into local allocas if it can avoid it

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Wed Jul 23 14:44:15 PDT 2014


http://llvm.org/bugs/show_bug.cgi?id=20419

            Bug ID: 20419
           Summary: clang should not copy parameters into local allocas if
                    it can avoid it
           Product: clang
           Version: unspecified
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: LLVM Codegen
          Assignee: unassignedclangbugs at nondot.org
          Reporter: rnk at google.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

In general, clang copies LLVM SSA arguments into allocas so that it can take
the address of the argument and allow the user to store to it.

We could probably improve our -O0 codegen a bit if we avoided creating allocas
for implicit 'this', vtt, and reference parameters, because their addresses
can't be taken.

We could hypothetically extend this to scalar arguments that are not stored or
address-taken, but that is extra work that might not be a compile time win.

This isn't particularly high priority, but I wanted to get it filed away.

-- 
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/20140723/6c58f68a/attachment.html>


More information about the llvm-bugs mailing list