<div dir="ltr">I'm glad to hear things are working reasonably well for you. :)<div><br></div><div>Regarding variables marked as optimized out, the main issue that I'm aware of has to do with parameters at function entry. We had a user report this as <a href="https://crbug.com/755841">https://crbug.com/755841</a>.</div><div><br></div><div>What you have in the screenshot doesn't seem related to parameters. It seems like this issue could be specific to 32-bit x86. We can definitely take a look at a more detailed bug report if you find the time to file one, but as Adrian mentioned, 64-bit is becoming the better tested, more robust, target.</div><div><br></div><div>Reid</div><div><br></div><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Mar 9, 2021 at 12:37 AM Tobias Hieta via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
We recently switched our windows builds from the CL compiler to<br>
clang-cl. This was a pretty big jump in terms of code generation and<br>
having a uniform compiler across all the major platforms.<br>
<br>
Our setup is that our Windows developer use MSVC as the IDE and<br>
compile with our own build of clang-cl and link with lld-link.<br>
<br>
Some of the developers noticed that some of the debug information are<br>
not as good as with CL. Or rather some variables seems to be optimized<br>
out, this is what the IDE says, see attached screenshot. I have tried<br>
to figure out if there is a rhyme and reason to what variables are<br>
gone - but I have not been able to see any pattern.<br>
<br>
Our command line is:<br>
<br>
clang-cl.exe /nologo -DUNICODE -DUSE_BREAKPAD -DWIN32<br>
-DWIN32_LEAN_AND_MEAN -DWINVER=0x0601 -D_CRT_NONSTDC_NO_DEPRECATE<br>
-D_CRT_SECURE_NO_WARNINGS -D_LEGACY_NAT_TRAVERSAL_ -D_REENTRANT<br>
-D_SCL_SECURE_NO_WARNINGS -D_SILENCE_ALL_CXX17_DEPRECATION_WARNINGS<br>
-D_UNICODE -D_WIN32_WINNT=0x0601 -D_WINSOCK_DEPRECATED_NO_WARNINGS<br>
-Iincludes -m32 -fdiagnostics-absolute-paths<br>
--target=i686-windows-msvc -m32 /DWIN32 /D_WINDOWS /GR /EHsc /Zi /Ob0<br>
/Od /RTC1 -MDd /Zm512 /EHsc /bigobj /W3 -Werror -Wsign-compare<br>
-Wno-reorder-ctor -Wno-delete-non-virtual-dtor -Wunused-variable<br>
-Wuninitialized -std:c++14<br>
<br>
Is there any good way to debug this or is it a known limitation with<br>
clang-cl or 32 bit (we don't do 64 yet - but with clang-cl we hope to<br>
move towards that soon). Or am I missing some flags?<br>
<br>
Thanks,<br>
Tobias<br>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div>