[llvm-commits] [llvm] r59011 - in /llvm/trunk: include/llvm/Transforms/Utils/DbgInfoUtils.h lib/Transforms/Utils/DbgInfoUtils.cpp
Chris Lattner
clattner at apple.com
Mon Nov 17 11:19:59 PST 2008
On Nov 17, 2008, at 9:58 AM, Devang Patel wrote:
>
> 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.
How wouldn't it?
>>> + // 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.
I don't understand. You're saying that the intrinsic will prevent
simplifycfg from doing a transformation? That seems like a problem
that should be fixed in the simplifycfg pass.
-Chris
More information about the llvm-commits
mailing list