re PR debug/37002 (No debug info on unreferenced parameters after stack alignment)
authorH.J. Lu <hongjiu.lu@intel.com>
Fri, 10 Oct 2008 23:28:05 +0000 (23:28 +0000)
committerH.J. Lu <hjl@gcc.gnu.org>
Fri, 10 Oct 2008 23:28:05 +0000 (16:28 -0700)
2008-10-10  H.J. Lu  <hongjiu.lu@intel.com>

PR debug/37002
* dwarf2out.c (mem_loc_descriptor): Use DRAP for vDRAP which
has been optimized out.

From-SVN: r141049

gcc/ChangeLog
gcc/dwarf2out.c

index c3c5908..2bc2367 100644 (file)
@@ -1,3 +1,9 @@
+2008-10-10  H.J. Lu  <hongjiu.lu@intel.com>
+
+       PR debug/37002
+       * dwarf2out.c (mem_loc_descriptor): Use DRAP for vDRAP which
+       has been optimized out.
+
 2008-10-10  Richard Sandiford  <rdsandiford@googlemail.com>
 
        * config/sh/sh.h (PREFERRED_RELOAD_CLASS): Test PIC_ADDR_P
index ed4d74d..614871e 100644 (file)
@@ -10008,6 +10008,16 @@ mem_loc_descriptor (rtx rtl, enum machine_mode mode,
         distinction between OP_REG and OP_BASEREG.  */
       if (REGNO (rtl) < FIRST_PSEUDO_REGISTER)
        mem_loc_result = based_loc_descr (rtl, 0, VAR_INIT_STATUS_INITIALIZED);
+      else if (stack_realign_drap
+              && crtl->drap_reg
+              && crtl->args.internal_arg_pointer == rtl
+              && REGNO (crtl->drap_reg) < FIRST_PSEUDO_REGISTER)
+       {
+         /* If RTL is internal_arg_pointer, which has been optimized
+            out, use DRAP instead.  */
+         mem_loc_result = based_loc_descr (crtl->drap_reg, 0,
+                                           VAR_INIT_STATUS_INITIALIZED);
+       }
       break;
 
     case MEM: