<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Nov 18, 2013 at 10:55 AM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Sun, Nov 17, 2013 at 6:35 PM, Manman Ren <<a href="mailto:manman.ren@gmail.com">manman.ren@gmail.com</a>> wrote:<br>
> Hi Bill,<br>
><br>
> Thanks for the testing case. Most of the time is spent on debug info<br>
> verifier.<br>
> I fixed a bug in r194974, now it takes too long to run debug info<br>
> verification.<br>
><br>
> Debug info verifier is part of the verifier which is a Function Pass. Tot<br>
> currently tries to pull all reachable debug info MDNodes in each function,<br>
> which is too time-consuming. The correct fix seems to be separating debug<br>
> info verification to its own module pass.<br>
><br>
> I will disable the debug info verifier until a correct fix is found.<br>
><br>
<br>
</div>Most likely what's going on here is that we're verifying the same sets<br>
of debug info multiple times. A way to quickly speed it up would be to<br>
cache/memoize the nodes we've already visited.<br></blockquote><div><br></div><div>Yes, we are verifying some debug info MDNodes multiple times. I am not sure if caching MDNodes visited in one function makes sense. </div>
<div>For each function, we apply a series of passes, so there are optimizations run between verifying one function and verifying another function.</div><div>The content of MDNodes verified in one function can potentially change when we are trying to verify another function.</div>
<div><br></div><div>Manman</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<span class="HOEnZb"><font color="#888888"><br>
-eric<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
> Thanks,<br>
> Manman<br>
><br>
><br>
><br>
> On Sun, Nov 17, 2013 at 6:04 PM, Bill Wendling <<a href="mailto:isanbard@gmail.com">isanbard@gmail.com</a>> wrote:<br>
>><br>
>> I think it might be. I’m attaching a preprocessed file that can show the<br>
>> problem. Compile it with ToT.<br>
>><br>
>> $ clang++ -g -fvisibility-inlines-hidden -fno-exceptions -fno-rtti<br>
>> -fno-common -Woverloaded-virtual -Wcast-qual -fno-strict-aliasing -m64<br>
>> -pedantic -Wno-long-long -Wall -W -Wno-unused-parameter -Wwrite-strings<br>
>> -Wcovered-switch-default -Wno-uninitialized -Wno-missing-field-initializers<br>
>> -c LLVMTidyModule.ii<br>
>><br>
>> -bw<br>
>><br>
>><br>
>><br>
>><br>
>> On Nov 17, 2013, at 6:01 PM, Manman Ren <<a href="mailto:mren@apple.com">mren@apple.com</a>> wrote:<br>
>><br>
>> > Hi Bill<br>
>> ><br>
>> > Is this a recent regression? I recently changed the debug info verifier<br>
>> > to fix a bug.<br>
>> ><br>
>> > Thanks,<br>
>> > Manman<br>
>> ><br>
>> >> On Nov 17, 2013, at 5:52 PM, Bill Wendling <<a href="mailto:isanbard@gmail.com">isanbard@gmail.com</a>> wrote:<br>
>> >><br>
>> >> I think that debug info is slowing a self-hosting build down. This<br>
>> >> build has been going for ages now and shows no sign of quitting. To<br>
>> >> reproduce, build a Release+Asserts build of clang. Then use that to build a<br>
>> >> Debug+Asserts version. Include all of the bells and whistles, like the<br>
>> >> clang-extras and compiler-rt libraries.<br>
>> >><br>
>> >> The reason I suspect debug info is because of this stack trace:<br>
>> >><br>
>> >> [morbo:llvm] lldb -p 92084<br>
>> >> Attaching to process with:<br>
>> >> process attach -p 92084<br>
>> >> Process 92084 stopped<br>
>> >> Executable module set to<br>
>> >> "/Users/morbo/llvm/llvm-clean.obj/Release+Asserts/bin/clang".<br>
>> >> Architecture set to: x86_64-apple-macosx.<br>
>> >> (lldb) bt<br>
>> >> * thread #1: tid = 0xbebaf, 0x000000010c5f6dc1<br>
>> >> clang`llvm::SmallPtrSetImpl::insert_imp(void const*) + 161, queue =<br>
>> >> 'com.apple.main-thread, stop reason = signal SIGSTOP<br>
>> >> frame #0: 0x000000010c5f6dc1<br>
>> >> clang`llvm::SmallPtrSetImpl::insert_imp(void const*) + 161<br>
>> >> frame #1: 0x000000010c5147df<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 47<br>
>> >> frame #2: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #3: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #4: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #5: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #6: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #7: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #8: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #9: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #10: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #11: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #12: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #13: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #14: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #15: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #16: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #17: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #18: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #19: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #20: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #21: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #22: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #23: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #24: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #25: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #26: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #27: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #28: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #29: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #30: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #31: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #32: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #33: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #34: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #35: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #36: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #37: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #38: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #39: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #40: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #41: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #42: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #43: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #44: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #45: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #46: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #47: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #48: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #49: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #50: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #51: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #52: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #53: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #54: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #55: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #56: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #57: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #58: 0x000000010c5145f3<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 547<br>
>> >> frame #59: 0x000000010c514695<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 709<br>
>> >> frame #60: 0x000000010c5148c4<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 276<br>
>> >> frame #61: 0x000000010c514701<br>
>> >> clang`llvm::DebugInfoFinder::processType(llvm::DIType) + 817<br>
>> >> frame #62: 0x000000010c5140e2<br>
>> >> clang`llvm::DebugInfoFinder::processScope(llvm::DIScope) + 50<br>
>> >> frame #63: 0x000000010c514895<br>
>> >> clang`llvm::DebugInfoFinder::processSubprogram(llvm::DISubprogram) + 229<br>
>> >> frame #64: 0x000000010c5141e2<br>
>> >> clang`llvm::DebugInfoFinder::processScope(llvm::DIScope) + 306<br>
>> >> frame #65: 0x000000010c514cdb<br>
>> >> clang`llvm::DebugInfoFinder::processLocation(llvm::Module const&,<br>
>> >> llvm::DILocation) + 91<br>
>> >> frame #66: 0x000000010c5af3d6 clang`(anonymous<br>
>> >> namespace)::Verifier::visitInstruction(llvm::Instruction&) + 2278<br>
>> >> frame #67: 0x000000010c5b0bc1 clang`(anonymous<br>
>> >> namespace)::Verifier::VerifyCallSite(llvm::CallSite) + 1489<br>
>> >> frame #68: 0x000000010c5af949 clang`(anonymous<br>
>> >> namespace)::Verifier::visitCallInst(llvm::CallInst&) + 73<br>
>> >> frame #69: 0x000000010c5adbea clang`llvm::InstVisitor<(anonymous<br>
>> >> namespace)::Verifier, void>::visit(llvm::Instruction&) + 10058<br>
>> >> frame #70: 0x000000010c5aa56b clang`(anonymous<br>
>> >> namespace)::Verifier::runOnFunction(llvm::Function&) + 1611<br>
>> >> frame #71: 0x000000010c58963b<br>
>> >> clang`llvm::FPPassManager::runOnFunction(llvm::Function&) + 347<br>
>> >> frame #72: 0x000000010c588e4b<br>
>> >> clang`llvm::legacy::FunctionPassManagerImpl::run(llvm::Function&) + 235<br>
>> >> frame #73: 0x000000010c588d26<br>
>> >> clang`llvm::legacy::FunctionPassManager::run(llvm::Function&) + 86<br>
>> >> frame #74: 0x000000010ad490f4<br>
>> >> clang`clang::EmitBackendOutput(clang::DiagnosticsEngine&,<br>
>> >> clang::CodeGenOptions const&, clang::TargetOptions const&,<br>
>> >> clang::LangOptions const&, llvm::Module*, clang::BackendAction,<br>
>> >> llvm::raw_ostream*) + 5492<br>
>> >> frame #75: 0x000000010ae47b45<br>
>> >> clang`clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) +<br>
>> >> 453<br>
>> >> frame #76: 0x000000010ae99764 clang`clang::ParseAST(clang::Sema&,<br>
>> >> bool, bool) + 516<br>
>> >> frame #77: 0x000000010ae469da<br>
>> >> clang`clang::CodeGenAction::ExecuteAction() + 122<br>
>> >> frame #78: 0x000000010abf3e66 clang`clang::FrontendAction::Execute()<br>
>> >> + 134<br>
>> >> frame #79: 0x000000010abcf70d<br>
>> >> clang`clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 973<br>
>> >> frame #80: 0x000000010ab97a44<br>
>> >> clang`clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 4276<br>
>> >> frame #81: 0x000000010ab8f843 clang`cc1_main(char const**, char<br>
>> >> const**, char const*, void*) + 835<br>
>> >> frame #82: 0x000000010ab93d52 clang`main + 1138<br>
>> >> frame #83: 0x00007fff910165fd libdyld.dylib`start + 1<br>
>> >> frame #84: 0x00007fff910165fd libdyld.dylib`start + 1<br>
>> >> (lldb)<br>
>> >><br>
>> >> This is the command:<br>
>> >><br>
>> >> morbo 92084 100.0 2.3 2888888 380520 s002 R+ 5:47PM<br>
>> >> 1:10.64 /Users/morbo/llvm/llvm-clean.obj/Release+Asserts/bin/clang -cc1<br>
>> >> -triple x86_64-apple-macosx10.9.0 -emit-obj -mrelax-all -disable-free<br>
>> >> -main-file-name LLVMTidyModule.cpp -mrelocation-model pic -pic-level 2<br>
>> >> -mdisable-fp-elim -relaxed-aliasing -masm-verbose -munwind-tables<br>
>> >> -target-cpu core2 -target-linker-version 136 -gdwarf-2 -coverage-file<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm/Debug+Asserts/LLVMTidyModule.o<br>
>> >> -resource-dir<br>
>> >> /Users/morbo/llvm/llvm-clean.obj/Release+Asserts/bin/../lib/clang/3.4<br>
>> >> -dependency-file<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm/Debug+Asserts/LLVMTidyModule.d.tmp<br>
>> >> -MP -MT<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm/Debug+Asserts/LLVMTidyModule.o<br>
>> >> -MT<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm/Debug+Asserts/LLVMTidyModule.d<br>
>> >> -D _DEBUG -D _GNU_SOURCE -D __STDC_CONSTANT_MACROS -D __STDC_!<br>
>> >> FORMAT_MACROS -D __STDC_LIMIT_MACROS -I<br>
>> >> /Users/morbo/llvm/llvm.obj/include -I<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm -I<br>
>> >> /Users/morbo/llvm/llvm.src/include -I<br>
>> >> /Users/morbo/llvm/llvm.src/tools/clang/tools/extra/clang-tidy/llvm -I<br>
>> >> /Users/morbo/llvm/llvm.src/tools/clang/tools/extra/clang-tidy/llvm/../../../../include<br>
>> >> -I<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm/../../../../include<br>
>> >> -I /Users/morbo/llvm/llvm-clean.install/lib/c++/v1 -stdlib=libc++<br>
>> >> -Woverloaded-virtual -Wcast-qual -Wno-long-long -Wall -W<br>
>> >> -Wno-unused-parameter -Wwrite-strings -Wcovered-switch-default<br>
>> >> -Wno-uninitialized -Wno-missing-field-initializers -pedantic<br>
>> >> -fdeprecated-macro -fdebug-compilation-dir<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm<br>
>> >> -ferror-limit 19 -fmessage-length 191 -fvisibility-inlines-hidden<br>
>> >> -stack-protector 1 -mstackrealign -fblocks -fno-rtti<br>
>> >> -fobjc-runtime=macosx-10.9.0 -fencode-extended-block-signature -fno-common<br>
>> >> -fdi!<br>
>> >> agnostics-show-option -fcolor-diagnostics -vectorize-slp -o<br>
>> >> /Users/morbo/llvm/llvm.obj/tools/clang/tools/extra/clang-tidy/llvm/Debug+Asserts/LLVMTidyModule.o<br>
>> >> -x c++<br>
>> >> /Users/morbo/llvm/llvm.src/tools/clang/tools/extra/clang-tidy/llvm/LLVMTidyModule.cpp<br>
>> >><br>
>> >><br>
>> >> -bw<br>
>> >><br>
>> >><br>
>> >> _______________________________________________<br>
>> >> LLVM Developers mailing list<br>
>> >> <a href="mailto:LLVMdev@cs.uiuc.edu">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
>> >> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
>><br>
>><br>
><br>
</div></div></blockquote></div><br></div></div>