[llvm] r182016 - Remove dead calls to addFrameMove.

Rafael Espindola rafael.espindola at gmail.com
Thu May 16 08:08:37 PDT 2013


Author: rafael
Date: Thu May 16 10:08:37 2013
New Revision: 182016

URL: http://llvm.org/viewvc/llvm-project?rev=182016&view=rev
Log:
Remove dead calls to addFrameMove.

Without a PROLOG_LABEL present, the cfi instructions are never printed.

Modified:
    llvm/trunk/lib/Target/Hexagon/HexagonFrameLowering.cpp

Modified: llvm/trunk/lib/Target/Hexagon/HexagonFrameLowering.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/Hexagon/HexagonFrameLowering.cpp?rev=182016&r1=182015&r2=182016&view=diff
==============================================================================
--- llvm/trunk/lib/Target/Hexagon/HexagonFrameLowering.cpp (original)
+++ llvm/trunk/lib/Target/Hexagon/HexagonFrameLowering.cpp Thu May 16 10:08:37 2013
@@ -76,17 +76,12 @@ void HexagonFrameLowering::determineFram
 void HexagonFrameLowering::emitPrologue(MachineFunction &MF) const {
   MachineBasicBlock &MBB = MF.front();
   MachineFrameInfo *MFI = MF.getFrameInfo();
-  MachineModuleInfo &MMI = MF.getMMI();
   MachineBasicBlock::iterator MBBI = MBB.begin();
   const HexagonRegisterInfo *QRI =
     static_cast<const HexagonRegisterInfo *>(MF.getTarget().getRegisterInfo());
   DebugLoc dl = MBBI != MBB.end() ? MBBI->getDebugLoc() : DebugLoc();
   determineFrameLayout(MF);
 
-  // Check if frame moves are needed for EH.
-  bool needsFrameMoves = MMI.hasDebugInfo() ||
-    !MF.getFunction()->needsUnwindTableEntry();
-
   // Get the number of bytes to allocate from the FrameInfo.
   int NumBytes = (int) MFI->getStackSize();
 
@@ -113,26 +108,6 @@ void HexagonFrameLowering::emitPrologue(
     MO.setImm(MFI->getMaxCallFrameSize());
   }
 
- if (needsFrameMoves) {
-   // Advance CFA. DW_CFA_def_cfa
-   unsigned FPReg = QRI->getFrameRegister();
-   unsigned RAReg = QRI->getRARegister();
-
-   MachineLocation Dst(MachineLocation::VirtualFP);
-   MachineLocation Src(FPReg, -8);
-   MMI.addFrameMove(0, Dst, Src);
-
-   // R31 = (R31 - #4)
-   MachineLocation LRDst(RAReg, -4);
-   MachineLocation LRSrc(RAReg);
-   MMI.addFrameMove(0, LRDst, LRSrc);
-
-   // R30 = (R30 - #8)
-   MachineLocation SPDst(FPReg, -8);
-   MachineLocation SPSrc(FPReg);
-   MMI.addFrameMove(0, SPDst, SPSrc);
- }
-
   //
   // Only insert ALLOCFRAME if we need to.
   //





More information about the llvm-commits mailing list