[llvm-bugs] [Bug 42852] New: ArgumentPromotion may not optimize 'byval' arguments

via llvm-bugs llvm-bugs at lists.llvm.org
Wed Jul 31 13:20:52 PDT 2019


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

            Bug ID: 42852
           Summary: ArgumentPromotion may not optimize 'byval' arguments
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Interprocedural Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: jdoerfert at anl.gov
                CC: llvm-bugs at lists.llvm.org

Test like:
  llvm/test/Transforms/ArgumentPromotion/byval-2.ll
  llvm/test/Transforms/ArgumentPromotion/attrs.ll
show how we do not optimize byvals even if we could. While some of the checking
for argument promotion is impacted by byval, we could be way more aggressive as
the callee basically can have an own copy of the promoted value.

Desired behavior:
In both cases we want the 'byval %X' to be promoted and replaced by a local
allocation which is initialized with the preloaded value of %X.

-- 
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/20190731/ac34cdc0/attachment.html>


More information about the llvm-bugs mailing list