[llvm-commits] [llvm] r59011 - in /llvm/trunk: include/llvm/Transforms/Utils/DbgInfoUtils.h lib/Transforms/Utils/DbgInfoUtils.cpp
Devang Patel
dpatel at apple.com
Mon Nov 17 09:58:27 PST 2008
On Nov 15, 2008, at 10:41 PM, Chris Lattner wrote:
>
> On Nov 10, 2008, at 4:53 PM, Devang Patel wrote:
>
>> Author: dpatel
>> Date: Mon Nov 10 18:53:02 2008
>> New Revision: 59011
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=59011&view=rev
>> Log:
>> Add utility routines to remove dead debug info.
>
> Hi Devang,
>
> Instead of making this a "minipass" which is called by other passes,
> why not just make instcombine (and only instcombine) do this?
> Instcombine runs many times in a typical compilation, and it can do
> this very cheaply (cost proportional to the number of debug
> intrinsics, instead of scanning entire functions even when there are
> none).
However we want
$ opt -adce foo.bc -o foo.optimzed.bc
to preserve valid debug info.
>> + // If a llvm.dbg.stoppoint is placed just before an
>> unconditional
>> + // branch then remove the llvm.dbg.stoppoint intrinsic.
>> + else if (BranchInst *UC = dyn_cast<BranchInst>(Next)) {
>> + if (UC->isUnconditional()
>
> Why? This doesn't seem right.
If it is a unconditional branch then sooner or later the cfg will be
simplified and this may get in a way for a pass doing simple clean.
-
Devang
More information about the llvm-commits
mailing list