[LLVMbugs] [Bug 14159] New: [AVX] Frame Pointer unnecessarily created for AVX functions

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue Oct 23 11:02:14 PDT 2012


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

             Bug #: 14159
           Summary: [AVX] Frame Pointer unnecessarily created for AVX
                    functions
           Product: libraries
           Version: trunk
          Platform: PC
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: Backend: X86
        AssignedTo: unassignedbugs at nondot.org
        ReportedBy: cameron.mcinally at nyu.edu
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified


Created attachment 9406
  --> http://llvm.org/bugs/attachment.cgi?id=9406
Trivial LLVM IR test case

There is a performance regression in the X86 backend related to PR10884.

In trunk, the frame pointer is always set up when an AVX register is used in a
function. This is done in case 32-byte spill code is later introduced into the
function and hence dynamic stack realignment is needed.

The frame pointer is required when there are AVX sized objects on the stack.
Otherwise, it should be possible to omit the frame pointer. That is, assuming
the usual conditions apply for omitting the frame pointer.

Please see the attached trivial test case. The manifest of the issue can be
found here:

Index: lib/Target/X86/X86RegisterInfo.cpp
===================================================================
--- lib/Target/X86/X86RegisterInfo.cpp    (revision 166489)
+++ lib/Target/X86/X86RegisterInfo.cpp    (working copy)
@@ -781,7 +781,7 @@
       for (unsigned i = 0, e = RI.getNumVirtRegs(); i != e; ++i) {
         unsigned Reg = TargetRegisterInfo::index2VirtReg(i);
         if (RI.getRegClass(Reg)->getAlignment() > StackAlignment) {
-          FuncInfo->setForceFramePointer(true);
+          FuncInfo->setForceFramePointer(true); // HERE
           return true;
         }
       }

-- 
Configure bugmail: http://llvm.org/bugs/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.



More information about the llvm-bugs mailing list