<div dir="ltr">Thanks for the idea. It looks like another infinite loop in DAG Combine (like <a href="http://lists.llvm.org/pipermail/llvm-commits/Week-of-Mon-20140421/213744.html">r206873</a> and <a href="https://reviews.llvm.org/D26605">D26605</a>) when I compile that file with -O2 and for the core2 target cpu. Is there any advice on introspecting SelectionDAG? I'm not sure how to identify which part of the source code is triggering the infinite loop.<br><div><br></div><div>example stacktrace:<br></div><div>~~~<br>(lldb) thread backtrace all<br>* thread #1, queue = 'com.apple.main-thread', stop reason = signal SIGSTOP<br>  * frame #0: 0x00000001079c39d1 clang`llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults&, llvm::CodeGenOpt::Level) + 1441<br>    frame #1: 0x00000001079c242e clang`llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 974<br>    frame #2: 0x000000010790f726 clang`llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 6118<br>    frame #3: 0x0000000107907846 clang`llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 998<br>    frame #4: 0x000000010829cd54 clang`(anonymous namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 20<br>    frame #5: 0x000000010790590d clang`llvm::MachineFunctionPass::runOnFunction(llvm::Function&) + 125<br>    frame #6: 0x00000001078c2562 clang`llvm::FPPassManager::runOnFunction(llvm::Function&) + 498<br>    frame #7: 0x00000001078eb943 clang`llvm::FPPassManager::runOnModule(llvm::Module&) + 67<br>    frame #8: 0x00000001078c67f5 clang`llvm::legacy::PassManagerImpl::run(llvm::Module&) + 693<br>    frame #9: 0x000000010789e09c clang`clang::EmitBackendOutput(clang::DiagnosticsEngine&, clang::HeaderSearchOptions const&, clang::CodeGenOptions const&, clang::TargetOptions const&, clang::LangOptions const&, llvm::DataLayout const&, llvm::Module*, clang::BackendAction, std::__1::unique_ptr<llvm::raw_pwrite_stream, std::__1::default_delete<llvm::raw_pwrite_stream> >) + 2700<br>    frame #10: 0x000000010786f00a clang`clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) + 410<br>    frame #11: 0x000000010754b249 clang`clang::ParseAST(clang::Sema&, bool, bool) + 249<br>    frame #12: 0x00000001075482bc clang`clang::FrontendAction::Execute() + 44<br>    frame #13: 0x00000001074fe666 clang`clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) + 294<br>    frame #14: 0x00000001074fc7b9 clang`clang::ExecuteCompilerInvocation(clang::CompilerInstance*) + 2329<br>    frame #15: 0x00000001074c6974 clang`cc1_main(llvm::ArrayRef<char const*>, char const*, void*) + 1492<br>    frame #16: 0x00000001074c24ac clang`main + 13820<br>    frame #17: 0x00007fff6206b145 libdyld.dylib`start + 1<br>    frame #18: 0x00007fff6206b145 libdyld.dylib`start + 1<br>~~~<br></div><div><br></div><div>Regards,<br></div><div>Steve<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 29, 2017 at 12:57 AM, Csaba Raduly <span dir="ltr"><<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Steven,<br>
<br>
If the compiler hangs, try to attach the debugger (gdb --pid). You<br>
should be able to get a stack trace, which would carry more<br>
information.<br>
<div><div class="h5"><br>
On Thu, Sep 28, 2017 at 10:03 PM, Steven Peters via cfe-dev<br>
<<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>> wrote:<br>
> Hello,<br>
><br>
> I've been digging into a compilation problem using the version of clang<br>
> distrubuted with XCode 9 on macOS High Sierra. I narrowed the problem down<br>
> to the transition from `-O1` to `-O2` for a target cpu of core2, and then I<br>
> further narrowed it down to the `-vectorize-loops` option for clang. The<br>
> challenge is that this problem manifests with clang failing to terminate. I<br>
> don't know if it's a deadlock or getting stuck in an infinite loop, but I<br>
> didn't see any guidance in the support documents about how to submit a bug<br>
> report in a case like this.<br>
><br>
> Current discussion of the compilation failure:<br>
> <a href="https://github.com/bulletphysics/bullet3/issues/1347" rel="noreferrer" target="_blank">https://github.com/<wbr>bulletphysics/bullet3/issues/<wbr>1347</a><br>
><br>
> ~~~<br>
> $ cc --version<br>
> Apple LLVM version 9.0.0 (clang-900.0.37)<br>
> Target: x86_64-apple-darwin17.0.0<br>
> Thread model: posix<br>
> InstalledDir: /Library/Developer/<wbr>CommandLineTools/usr/bin<br>
> ~~~<br>
><br>
> Thanks for your time.<br>
><br>
> Regards,<br>
> Steve Peters<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
><br>
<span class="HOEnZb"><font color="#888888"><br>
<br>
<br>
--<br>
GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>
The Tao of math: The numbers you can count are not the real numbers.<br>
Life is complex, with real and imaginary parts.<br>
"Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>
"People disagree with me. I just ignore them." -- Linus Torvalds<br>
</font></span></blockquote></div><br></div>