-
Notifications
You must be signed in to change notification settings - Fork 10.6k
Support LLVM optimization remarks in WMO mode #82646
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
Support LLVM optimization remarks in WMO mode #82646
Conversation
@swift-ci test |
} | ||
|
||
auto auxRS = std::make_unique<llvm::remarks::RemarkStreamer>( | ||
std::move(*remarkSerializerOrErr), filename); |
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.
Could we set the filter here according to the passed command line argument (similar to
swift/lib/SIL/Utils/SILRemarkStreamer.cpp
Line 85 in d203591
if (llvm::Error err = mainRS->setFilter(passes)) { |
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.
👍
if (IGM.getOptions().AnnotateCondFailMessage) { | ||
Context.setLLVMRemarkStreamer( | ||
std::make_unique<llvm::LLVMRemarkStreamer>(RS)); | ||
// FIXME: add a frontend flag to enable all LLVM remarks | ||
cantFail(RS.setFilter("annotation-remarks")); | ||
} else { |
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.
Since we just enable the LLVM remarks by default for now, I think we should remove this branch/filter entirely, otherwise we filter for annotation remarks in the main file only, but not in the aux files.
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.
👍
b1edbac
to
5c7e017
Compare
@swift-ci test |
…es in WMO mode rdar://154403078
5c7e017
to
b30bd40
Compare
@swift-ci test |
@swift-ci test macOS |
@swift-ci test linux |
Add code to create llvm::RemarkStreamer objects for all the LLVMModules in WMO mode.
This way we can collect optimization remarks from the LLVM optimizer and backend.
rdar://154403078