Skip to content

add support for LLVM pass optimization remarks #17116

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

Closed
thestinger opened this issue Sep 9, 2014 · 2 comments
Closed

add support for LLVM pass optimization remarks #17116

thestinger opened this issue Sep 9, 2014 · 2 comments
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@thestinger
Copy link
Contributor

http://clang.llvm.org/docs/UsersManual.html#options-to-emit-optimization-reports

@thestinger thestinger added E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue. A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. labels Sep 9, 2014
@kmcallister
Copy link
Contributor

Looking into this.

@huonw huonw added the A-diagnostics Area: Messages for errors, warnings, and lints label Sep 9, 2014
@sanxiyn
Copy link
Member

sanxiyn commented Sep 11, 2014

FYI, this is done using LLVMContext::setDiagnosticHandler. Look at Clang's CodeGenAction.cpp for an example handler implementation.

bors added a commit that referenced this issue Sep 15, 2014
I would like to map this information back to AST nodes, so that we can print remarks with spans, and so that remarks can be enabled on a per-function basis.  Unfortunately, doing this would require a lot more code restructuring — for example, we currently throw away the AST map and lots of other information before LLVM optimizations run.  So for the time being, we print the remarks with debug location strings from LLVM.  There's a warning if you use `-C remark` without `--debuginfo`.

Fixes #17116.
@bors bors closed this as completed in ad9a1da Sep 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-diagnostics Area: Messages for errors, warnings, and lints A-LLVM Area: Code generation parts specific to LLVM. Both correctness bugs and optimization-related issues. E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants