[PATCH] LowerDbgDeclare - get rid of redundant dbg.values when an alloca survives optimization

Robinson, Paul Paul_Robinson at playstation.sony.com
Mon Mar 31 09:25:29 PDT 2014


> -----Original Message-----
> From: llvm-commits-bounces at cs.uiuc.edu [mailto:llvm-commits-
> bounces at cs.uiuc.edu] On Behalf Of Adrian Prantl
> Sent: Monday, March 31, 2014 8:58 AM
> To: David Blaikie
> Cc: llvm-commits
> Subject: Re: [PATCH] LowerDbgDeclare - get rid of redundant dbg.values
> when an alloca survives optimization
> 
> 
> On Mar 30, 2014, at 12:02 PM, David Blaikie <dblaikie at gmail.com> wrote:
> 
> > When you say "dropping all dbg.declares" - do you mean we're removing
> > that intrinsic from LLVM entirely (ie: it won't exist) or that we
> > "drop" dbg.declares in IR by removing them at some point in the middle
> > end?
> 
> I'm not sure if I understand this question entirely, but yes,
> LowerDbgDeclare will lower a dbg.declare into multiple dbg.values (one
> for each use) and then delete the dbg.declare.

In terms of information content, it seems like we could eliminate the
dbg.declare intrinsic entirely by having the frontend attach one more bit
of metadata to the associated alloca, which already has two of the three
bits of info that dbg.declare has.

Given the number of -g optimization issues we've found (without really 
trying) it might be worth thinking about how to eliminate dbg.value also.
--paulr






More information about the llvm-commits mailing list