-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Fix bugs that caused IRGen to behave differently when debug info was … #16933
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
@swift-ci test and merge |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
@swift-ci test and merge |
/// Force all archetypes referenced by the type to be bound by this point. | ||
/// TODO: just make sure that we have a path to them that the debug info | ||
/// can follow. | ||
void bindArchetypes(swift::Type Ty) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be nice if lldb only required type metadata for top-level generic arguments, and not any referenced associated types. Can you file a radar to fix that? It would be feasible to tackle this once you're able to use remote mirrors to calculate layouts (remote mirrors doesn't require metadata instantiation in the target).
d3dac0d
to
c71c736
Compare
@swift-ci test and merge |
…enabled. It hass been a longstanding principle in LLVM that the presence of debug info shall not affect code generation. This patch brings the Swift frontend closer to this ideal: - unconditionally emit shadow copies - unconditionally bind type metadata The extra allocas, bitcasts, geps, and stores being emitted get optimized away when compiling at anything but -Onone. There are few use-cases for compiling at -Onone without -g, so this shouldn't affect performance for any real-world use-cases.
@swift-ci test and merge |
1 similar comment
@swift-ci test and merge |
…enabled.
It hass been a longstanding principle in LLVM that the presence of
debug info shall not affect code generation. This patch brings the
Swift frontend closer to this ideal:
The extra allocas, bitcasts, geps, and stores being emitted get
optimized away when compiling at anything but -Onone. There are few
use-cases for compiling at -Onone without -g, so this shouldn't affect
performance for any real-world use-cases.
rdar://problem/26633363