[llvm-commits] [llvm] r59011 - in /llvm/trunk: include/llvm/Transforms/Utils/DbgInfoUtils.h lib/Transforms/Utils/DbgInfoUtils.cpp

Chris Lattner clattner at apple.com
Sat Nov 15 22:41:10 PST 2008


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).

> +    // 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.

-Chris




More information about the llvm-commits mailing list