[PATCH] D138995: [CodeView] Add support for local S_CONSTANT records
Tobias Hieta via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 1 04:18:19 PST 2022
thieta added a comment.
In D138995#3961742 <https://reviews.llvm.org/D138995#3961742>, @aganea wrote:
> Thanks, that's a nice improvement! Out of curiosity does this optimization happen at `-O0` too? (when using clang-cl)
> Does MSVC generate `S_CONSTANT` as well for your test-case?
In general -O0 doesn't have this problem. I have seen it happen, but unsure what triggers it.
No MSVC doesn't generate S_CONSTANTS for any of my cases. They only use it when you actually do a constant, in most of the cases MSVC doesn't output anything or outputs a S_LOCAL with the optimized away flag set. I tried with /Zo as well and couldn't get it do anything differently.
I even tried to debug several programs with msvc and their default flags, and with /O2 <https://reviews.llvm.org/owners/package/2/> they always had same debugging info as clang-cl.
They do behave better with /O2 <https://reviews.llvm.org/owners/package/2/>, mostly because clang really don't want to emit all declarations if they are global and can const propagate some variables.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D138995/new/
https://reviews.llvm.org/D138995
More information about the llvm-commits
mailing list