Hiya, Is there any easy way to remove the debug info from the LLVM byte code once I have collected all the debug info I needed? It is because the debug info seems to slow down the program significantly. I may be able to go through each basic block and delete the debug info in my pass. But, is there any elegant way to do it? Cheers, Zheng
Hi Zheng,> Is there any easy way to remove the debug info from the LLVM byte code > once I have collected all the debug info I needed? It is because the > debug info seems to slow down the program significantly. I may be able > to go through each basic block and delete the debug info in my pass. > But, is there any elegant way to do it?the opt tool has an option called -strip-debug, so presumably there is already a pass or utility that does this. Best wishes, Duncan.
On Thu, May 20, 2010 at 4:26 AM, Duncan Sands <baldrick at free.fr> wrote:> Hi Zheng, > >> Is there any easy way to remove the debug info from the LLVM byte code >> once I have collected all the debug info I needed? It is because the >> debug info seems to slow down the program significantly. I may be able >> to go through each basic block and delete the debug info in my pass. >> But, is there any elegant way to do it? > > the opt tool has an option called -strip-debug, so presumably there is > already a pass or utility that does this.Yup, see StripDebugInfo() in StripSymbols.cpp. - Devang