[llvm-commits] [llvm] r106792 - in /llvm/trunk: lib/CodeGen/AsmPrinter/DwarfDebug.cpp test/FrontendC/2010-06-24-DbgInlinedFnParameter.c

Dale Johannesen dalej at apple.com
Mon Jun 28 10:31:54 PDT 2010


This is still failing.  Is there a fix in sight?

On Jun 25, 2010, at 11:42 AMPDT, Devang Patel wrote:

> Is it possible for some to send me generated 2010-06-24- 
> DbgInlinedFnParameter.c.tmp.s ?
>
> Thanks,
> -
> Devang
> On Jun 25, 2010, at 7:21 AM, Daniel Dunbar wrote:
>
>> Hi Devang,
>>
>> This test is failing on a two-stage llvm-gcc bootstrap. See here:
>>  http://google1.osuosl.org:8011/builders/llvm-gcc-i686-darwin10-selfhost/builds/5139/steps/test.llvm.stage2/logs/2010-06-24-dbginlinedfnparameter.c
>>
>> - Daniel
>>
>> On Thu, Jun 24, 2010 at 2:51 PM, Devang Patel <dpatel at apple.com>  
>> wrote:
>>> Author: dpatel
>>> Date: Thu Jun 24 16:51:19 2010
>>> New Revision: 106792
>>>
>>> URL: http://llvm.org/viewvc/llvm-project?rev=106792&view=rev
>>> Log:
>>> DBG_VALUE machine instruction pointing to undefined register for a  
>>> variable justify a separate scope if the variable is inlined  
>>> function's argument.
>>> Radar 8122864.
>>>
>>> Added:
>>>    llvm/trunk/test/FrontendC/2010-06-24-DbgInlinedFnParameter.c
>>> Modified:
>>>    llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>>>
>>> Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp?rev=106792&r1=106791&r2=106792&view=diff
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> ====================================================================
>>> --- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp (original)
>>> +++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfDebug.cpp Thu Jun 24  
>>> 16:51:19 2010
>>> @@ -2390,8 +2390,6 @@
>>>  static bool hasValidLocation(LLVMContext &Ctx,
>>>                              const MachineInstr *MInsn,
>>>                              const MDNode *&Scope, const MDNode  
>>> *&InlinedAt) {
>>> -  if (MInsn->isDebugValue())
>>> -    return false;
>>>   DebugLoc DL = MInsn->getDebugLoc();
>>>   if (DL.isUnknown()) return false;
>>>
>>> @@ -2655,7 +2653,6 @@
>>>         assert (MI->getNumOperands() > 1 && "Invalid machine  
>>> instruction!");
>>>         DIVariable DV(MI->getOperand(MI->getNumOperands() -  
>>> 1).getMetadata());
>>>         if (!DV.Verify()) continue;
>>> -        if (isDbgValueInUndefinedReg(MI)) continue;
>>>         // If DBG_VALUE is for a local variable then it needs a  
>>> label.
>>>         if (DV.getTag() != dwarf::DW_TAG_arg_variable)
>>>           InsnNeedsLabel.insert(MI);
>>> @@ -2663,7 +2660,7 @@
>>>         else if (!DISubprogram(DV.getContext()).describes(MF- 
>>> >getFunction()))
>>>           InsnNeedsLabel.insert(MI);
>>>         // DBG_VALUE indicating argument location change needs a  
>>> label.
>>> -        else if (!ProcessedArgs.insert(DV))
>>> +        else if (isDbgValueInUndefinedReg(MI) == false && ! 
>>> ProcessedArgs.insert(DV))
>>>           InsnNeedsLabel.insert(MI);
>>>       } else {
>>>         // If location is unknown then instruction needs a  
>>> location only if
>>>
>>> Added: llvm/trunk/test/FrontendC/2010-06-24-DbgInlinedFnParameter.c
>>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/FrontendC/2010-06-24-DbgInlinedFnParameter.c?rev=106792&view=auto
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> = 
>>> ====================================================================
>>> --- llvm/trunk/test/FrontendC/2010-06-24-DbgInlinedFnParameter.c  
>>> (added)
>>> +++ llvm/trunk/test/FrontendC/2010-06-24-DbgInlinedFnParameter.c  
>>> Thu Jun 24 16:51:19 2010
>>> @@ -0,0 +1,15 @@
>>> +// RUN: %llvmgcc -S -O2 -g %s -o - | llc -O2 -o %t.s
>>> +// RUN: grep  "# DW_TAG_formal_parameter" %t.s | count 4
>>> +// Radar 8122864
>>> +static int foo(int a, int j) {
>>> +  int k = 0;
>>> +  if (a)
>>> +    k = a + j;
>>> +  else
>>> +    k = j;
>>> +  return k;
>>> +}
>>> +int bar(int o, int p) {
>>> +
>>> +  return foo(o, p);
>>> +}
>>>
>>>
>>> _______________________________________________
>>> llvm-commits mailing list
>>> llvm-commits at cs.uiuc.edu
>>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20100628/57030601/attachment.html>


More information about the llvm-commits mailing list