[llvm] r185993 - Un-break the buildbot by tweaking the indirection flag.

Adrian Prantl aprantl at apple.com
Wed Jul 10 17:53:54 PDT 2013


On Jul 10, 2013, at 2:58 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Wed, Jul 10, 2013 at 2:56 PM, Adrian Prantl <aprantl at apple.com> wrote:
>> 
>> On Jul 10, 2013, at 2:51 PM, David Blaikie <dblaikie at gmail.com> wrote:
>>> 
>>> So we're on the same page: isIndirect implies that the IR type is a
>>> pointer. That was my intention, at least - is that clear/agreed?
>> 
>> That the IR type is a pointer of foo, but the type of the DIVariable is foo. (As in your example with nontrivial by-value arguments).
> 
> Yep.

Hi David,

I’ve got it working now. There is one thing I’d like to double-check with you before I commit my changes, though.

Can you elaborate on this change you made in r184387?

> @@ -384,13 +385,17 @@ void CompileUnit::addRegisterOffset(DIE *TheDie, unsigned 
>  /// addAddress - Add an address attribute to a die based on the location
>  /// provided.
>  void CompileUnit::addAddress(DIE *Die, unsigned Attribute,
> -                             const MachineLocation &Location) {
> +                             const MachineLocation &Location, bool Indirect) {
>    DIEBlock *Block = new (DIEValueAllocator) DIEBlock();
>  
> -  if (Location.isReg())
> +  if (Location.isReg() && !Indirect)
>      addRegisterOp(Block, Location.getReg());
> -  else
> +  else {
>      addRegisterOffset(Block, Location.getReg(), Location.getOffset());
> +    if (Indirect && !Location.isReg()) {
> +      addUInt(Block, 0, dwarf::DW_FORM_data1, dwarf::DW_OP_deref);
> +    }
> +  }
> 

The commit message does not really mention it.
Specifically, can there be a situation where MachineLocation::isIndirect() and DIVariable::isIndirect() disagree?

My patch essentially would revert this change, because we are now piping the IsIndirect flag all the way down to the MachineLocation, but I want to make sure that I’m not missing something.

thanks,
Adrian

PS: Patch attached for reference.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Add-all-of-the-DIVariable-flags-to-the-IR-comments.patch
Type: application/octet-stream
Size: 851 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130710/318cf162/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-Pipe-the-isIndirect-flag-all-the-way-down-from-DIVar.patch
Type: application/octet-stream
Size: 6699 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130710/318cf162/attachment-0001.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0014-Use-the-indirect-flag-for-VLAs-now-that-it-actually-.patch
Type: application/octet-stream
Size: 1646 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130710/318cf162/attachment-0002.obj>


More information about the llvm-commits mailing list